-
Notifications
You must be signed in to change notification settings - Fork 5
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
Freeze on big buffers #16
Comments
Hi @nico202 - sorry for the delay. Would you mind sharing the csv or provide a sample that I could test this with and maybe some more details about your setup? I assume the issue goes away when you disable global-highlight-thing-mode? Have you tried disabling font-locking? I often open files that have several megabytes without any issues (but I have font-locking generally disabled and run emacs only in a terminal). It'd be difficult to limit the highlighting in such a way as you describe as this lib uses very basic Emacs functionality. That functionality is usually rock-solid and I'm not too keen on implementing my own versions ;) If you're interested, at the core it uses a function called |
Hi, thanks for your reply. I attached the file (txt because of github). C-n on the first cell (0) takes 1 second, I think it depends on the fact that there are a lot. disabling font lock (font-lock-mode) does not help |
Thanks for the quick response! I do get some delay if move around constantly, with some delays to trigger the highlighting and it's probably as you say, the fact that there's tons to match, e.g. a lot of
(setq highlight-thing-delay-seconds 1)
(setq highlight-thing-what-thing 'region) |
edit: I don't have right now the time to read hi-lock-face-buffer doc, any way to limit the match results? |
Horrible CPU spikes and total freezes repro for me as well, actually just setting the mode to Sadly this is a huge bummer and makes the extension pretty much unusable for my purpose (I'm trying to achieve the same what VS Code does - highlight selected region occurrences after a delay, super useful for say comparing regions for equality and faster than doing M-s h r) Other "thing" modes seem to work fine but |
hi all - just pushed some commits that allow you to restrict the region to highlight in to several lines surrounding point. i added a brief note to the readme, but here's what i did that enabled me to move around in the file linked above without any delay: (setq highlight-thing-limit-to-region-in-large-buffers-p t
highlight-thing-narrow-region-lines 15
highlight-thing-large-buffer-limit 5000) this would highlight a given thing only if it is 15 lines above or below point when in a buffer that has more than 5000 "characters". no such restriction would apply to buffers with less characters. let me know if you run into any issues, optimistically closing this issue for now though :) |
Hi, thanks for this. It's working good, but I encountered a problem with big buffers.
I opened a 110kb csv with global-highlight-thing-mode on and my emacs just stopped working (not responding even to C-g).
Is it possible to limit the search to visible part, or to cursor +/- X lines? Else a timeout that tells it might not take more than X seconds or something.
Thanks, Nicolò
The text was updated successfully, but these errors were encountered: