File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -68,19 +68,30 @@ export class SvnContentProvider
6868 await eventToPromise ( onDidFocusWindow ) ;
6969 }
7070
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 ) {
7284 const uri = this . cache [ key ] . uri ;
7385 const fsPath = uri . fsPath ;
7486
75- for ( const root of this . changedRepositoryRoots ) {
87+ for ( const root of roots ) {
7688 if ( isDescendant ( root , fsPath ) ) {
7789 this . _onDidChange . fire ( uri ) ;
78- return ;
90+ continue cacheLoop ;
7991 }
8092 }
81- } ) ;
93+ }
8294
83- this . changedRepositoryRoots . clear ( ) ;
8495 }
8596
8697 public async provideTextDocumentContent ( uri : Uri ) : Promise < string > {
You can’t perform that action at this time.
0 commit comments