Commit 620b701 1 parent 5577bc2 commit 620b701 Copy full SHA for 620b701
File tree 1 file changed +16
-5
lines changed
1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -68,19 +68,30 @@ export class SvnContentProvider
68
68
await eventToPromise ( onDidFocusWindow ) ;
69
69
}
70
70
71
- Object . keys ( this . cache ) . forEach ( key => {
71
+ // Don't check if no has repository changes
72
+ if ( this . changedRepositoryRoots . size === 0 ) {
73
+ return ;
74
+ }
75
+
76
+ // Use copy to allow new items in parallel
77
+ const roots = Array . from ( this . changedRepositoryRoots ) ;
78
+ this . changedRepositoryRoots . clear ( ) ;
79
+
80
+ const keys = Object . keys ( this . cache ) ;
81
+
82
+ cacheLoop:
83
+ for ( const key of keys ) {
72
84
const uri = this . cache [ key ] . uri ;
73
85
const fsPath = uri . fsPath ;
74
86
75
- for ( const root of this . changedRepositoryRoots ) {
87
+ for ( const root of roots ) {
76
88
if ( isDescendant ( root , fsPath ) ) {
77
89
this . _onDidChange . fire ( uri ) ;
78
- return ;
90
+ continue cacheLoop ;
79
91
}
80
92
}
81
- } ) ;
93
+ }
82
94
83
- this . changedRepositoryRoots . clear ( ) ;
84
95
}
85
96
86
97
public async provideTextDocumentContent ( uri : Uri ) : Promise < string > {
You can’t perform that action at this time.
0 commit comments