Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Find Mode Performance and Responsiveness #4546

Open
3 tasks
darpham opened this issue Sep 30, 2024 · 1 comment
Open
3 tasks

Enhance Find Mode Performance and Responsiveness #4546

darpham opened this issue Sep 30, 2024 · 1 comment

Comments

@darpham
Copy link

darpham commented Sep 30, 2024

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 SimpleCache from ./lib/utils.js.
  • Offload text searching to a Web Worker or run asynchronously, possibly utilizing AsyncDataFetcher from ./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.
@UncleSnail
Copy link
Contributor

The first task should be sufficient. The second two are good ideas, but are probably unneeded and would introduce unnecessary complexity.
I like the idea for the debounce though, and this is a real issue. It also freezes on your example page on my machine. I'm going to take a look at your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants