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

Adding comparison with Isearch MB to README #96

Open
okamsn opened this issue Jul 6, 2021 · 1 comment
Open

Adding comparison with Isearch MB to README #96

okamsn opened this issue Jul 6, 2021 · 1 comment

Comments

@okamsn
Copy link

okamsn commented Jul 6, 2021

isearch-mb is a new package that allows one to use Isearch in the minibuffer, similar to how CtrlF works. Maybe it is worth mentioning it in the comparisons section of the README.

  • Since it is Isearch, it does not have some of the fancier CtrlF features like showing the count next to the match.
  • My experience has been that for larger files (~200 MB), using this package can be much faster than using CtrlF. I think this difference is due to Isearch's lazy highlighting, but I haven't looked into it deeply.
@raxod502
Copy link
Member

Makes sense, thanks for the pointer. Yes, indeed, CTRLF is slow for large files. That's because it's actually doing an eager search of the entire buffer every single time you move between candidates or type a character. The reason for this is because it makes the implementation much simpler. It's similar to what packages like Swiper do. Isearch, on the other hand, is basically exposing the search-forward primitive in an interactive fashion, and it has somewhat different semantics as a result.

Now I originally assumed doing a full buffer search would be a non-starter, and had ideas for how to make it asynchronous or otherwise better-optimized (e.g. searching some amount of the buffer at most and then returning control to the editor loop before moving on to the next batch). However, just doing the eager search turned out to be surprisingly fast, so I never got around to fixing this problem.

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

No branches or pull requests

2 participants