Skip to content

Commit 27eb60a

Browse files
Copilotalexr00
andcommitted
Optimize configuration key string concatenation for better performance
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent 0865c14 commit 27eb60a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/issues/issuesView.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ export class IssuesTreeData
3939
FolderRepositoryManager | IssueItem | null | undefined | void
4040
> = this._onDidChangeTreeData.event;
4141

42+
// Store the configuration key as a constant to avoid repeated string concatenation
43+
private static readonly AVATAR_SETTING_KEY = `${ISSUES_SETTINGS_NAMESPACE}.${ISSUE_AVATAR_DISPLAY}`;
44+
4245
constructor(
4346
private stateManager: StateManager,
4447
private manager: RepositoriesManager,
@@ -64,7 +67,7 @@ export class IssuesTreeData
6467
// Listen for changes to the avatar display setting
6568
context.subscriptions.push(
6669
vscode.workspace.onDidChangeConfiguration(change => {
67-
if (change.affectsConfiguration(`${ISSUES_SETTINGS_NAMESPACE}.${ISSUE_AVATAR_DISPLAY}`)) {
70+
if (change.affectsConfiguration(IssuesTreeData.AVATAR_SETTING_KEY)) {
6871
this._onDidChangeTreeData.fire();
6972
}
7073
}),

0 commit comments

Comments
 (0)