Repository navigation
Conversation
This branch has not been deployed
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.
Ordinary snippet selection rebuilt and rerendered the entire sidebar and performed synchronous settings reads for every row. This change reuses sidebar metadata and unchanged rows, searches once per input change, and skips serialization of unchanged initial editor contents during typing. Content search retains only the highlights shown in its excerpt instead of constructing and retaining full-file highlight segments.
The dashboard and AsciiDoc converter load on demand. Unchanged snippet rendering is reused, redundant runtime assets and unused font formats are excluded, Babel targets Electron 42, and KaTeX uses the bundled stylesheet. CodeMirror remains eagerly available: an earlier lazy editor build delayed the first editor opening by roughly 316 ms in the local fixture, so it was removed. Large editors use a bounded viewport, and collapsed files release their renderer.
Measurements
Five alternating production-renderer runs on the same macOS machine, comparing this draft with original master using matching fixture data:
The search fixture contains 1,000 locally loaded snippets of 100 lines each; it does not measure network fetches. The macOS footprint is the system-reported aggregate for the main, GPU, network, and renderer processes, including GPU allocations. It is workload- and machine-dependent. In a separate five-run settled browsing snapshot, reported footprint was 241.5 → 232.0 MiB. The app-wide memory savings are modest and do not reach a 20–30% target.
These results do not imply that every operation is faster: the lazy dashboard and AsciiDoc converter are not covered by the first-use timing above. Reproducible profiling commands and fixture details are in
tests/performance/README.md.Validation
npm run lint— passed.npm test— 436 tests across 66 files and development webpack build passed on the isolated draft branch.npm run test:packaged-smoke— production build, macOS arm64 packaging, and packaged rendering checks passed.npm run build, then localnpm startwith the isolatedeverydayfixture — visibly rendered the sidebar and expanded, highlighted snippet. Checked dimensions, loaded fonts, and captured the screenshot below.