perf: quick wins - webview minify, bounded cache, focus-aware poll#62
Open
CompN3rd wants to merge 1 commit into
Open
perf: quick wins - webview minify, bounded cache, focus-aware poll#62CompN3rd wants to merge 1 commit into
CompN3rd wants to merge 1 commit into
Conversation
…e poll - Add minify: !watch to webview build script (reduces bundles ~25-33%) - Replace unbounded Map with bounded TimelineCache (cap 200) in PipelinesProvider - Skip notification polling when VS Code window is unfocused
There was a problem hiding this comment.
Pull request overview
This PR delivers three targeted performance improvements across the extension’s webview build pipeline, pipelines tree view, and notification polling loop to reduce bundle size, bound memory usage, and avoid unnecessary background API traffic.
Changes:
- Minifies webview bundles in non-watch builds to reduce shipped JS size.
- Replaces an unbounded pipeline timeline
Mapcache with a bounded FIFO cache (200 entries) to prevent long-session memory growth. - Skips notification polling cycles when the VS Code window is not focused to reduce background ADO API calls.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/providers/pipelinesProvider.ts |
Introduces a bounded TimelineCache and uses it for timeline record caching to cap memory usage. |
src/notifications/notificationService.ts |
Adds a focus check to avoid polling when the window is unfocused. |
scripts/build-webviews.js |
Enables esbuild minification when not running in --watch mode to shrink webview bundles. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Three independent performance quick wins:
Webview minification — Added \minify: !watch\ to \scripts/build-webviews.js. Reduces webview bundles by 25–33%:
Bounded timeline cache — Replaced the unbounded \Map\ in \PipelinesProvider\ with \TimelineCache\ (cap 200 entries). Uses Map insertion order for FIFO eviction. Prevents memory leak in long-running sessions.
Focus-aware polling — \NotificationService.pollOnce()\ now skips when \�scode.window.state.focused\ is \alse. Eliminates unnecessary ADO API calls while the window is backgrounded.