Enhance Find Mode Performance and Responsiveness
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 27k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Problem Statement:
When using find mode (/) on large web pages, searching is slow to the point of unusable.
Reproducible via https://nix-community.github.io/home-manager/options.xhtml.
Planned Improvements:
- Delay / debounce
FindMode.findInPlace()to reduce the frequency of searches during typing. - Implement a caching mechanism for text nodes, potentially using
SimpleCachefrom./lib/utils.js. - Offload text searching to a Web Worker or run asynchronously, possibly utilizing
AsyncDataFetcherfrom./lib/utils.js.
Expected Benefits:
- Improved responsiveness during rapid typing in find mode.
- Faster search performance, especially on large web pages.
- Reduced strain on system resources during find operations.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing FindMode.findInPlace() and the in-review PR #4547 for the debounce work. Then inspect SimpleCache and AsyncDataFetcher in ./lib/utils.js, and reproduce the slowdown on the linked Home Manager options page. Done means find mode remains responsive on large pages and the planned search improvements are implemented and verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100