Skip to content

Commit d9feb2b

Browse files
nzaytsevd13
andcommitted
Applies performance tweak by @d13
Co-authored-by: Keith Daulton <[email protected]>
1 parent f299976 commit d9feb2b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/telemetry/walkthroughStateProvider.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,9 @@ export class WalkthroughStateProvider implements Disposable {
122122
}
123123

124124
get progress() {
125-
const doneValues = [...filter(this.state.values(), x => x)].length;
126-
return doneValues / Object.keys(WalkthroughContextKeys).length;
125+
const allValues = [...this.state.values()];
126+
const doneValues = allValues.filter(x => x).length;
127+
return doneValues / allValues.length;
127128
}
128129

129130
dispose(): void {

0 commit comments

Comments
 (0)