Skip to content

Commit 6c6d929

Browse files
committed
Cache unedfined custom label lookups
1 parent 474e566 commit 6c6d929

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/vs/workbench/services/editor/common/customEditorLabelService.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class CustomEditorLabelService extends Disposable implements ICustomEdito
4040
private patterns: ICustomEditorLabelPattern[] = [];
4141
private enabled = true;
4242

43-
private cache = new MRUCache<URI, string>(1000);
43+
private cache = new MRUCache<URI, string | undefined>(1000);
4444

4545
constructor(
4646
@IConfigurationService private readonly configurationService: IConfigurationService,
@@ -126,9 +126,7 @@ export class CustomEditorLabelService extends Disposable implements ICustomEdito
126126
}
127127

128128
const result = this.applyPatterns(resource);
129-
if (result !== undefined) {
130-
this.cache.set(resource, result);
131-
}
129+
this.cache.set(resource, result);
132130

133131
return result;
134132
}

0 commit comments

Comments
 (0)