vimium icon indicating copy to clipboard operation
vimium copied to clipboard

Enhance Find Mode Performance and Responsiveness

Open darpham opened this issue 1 year ago • 1 comments

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.
    • InReview https://github.com/philc/vimium/pull/4547
  • [ ] 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.

darpham avatar Sep 30 '24 03:09 darpham

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.

UncleSnail avatar Oct 08 '24 05:10 UncleSnail