-
Notifications
You must be signed in to change notification settings - Fork 314
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
post command hook slows down cursor movement when buffer has many (40~50k) overlays #926
Comments
Yes, it probably is. I think the patch in #927 should help, please test it out. |
I think it should be avoidable for the By the way, it looks like |
So I tried to make more consistent tests, and with (defun my-yas-report nil
(profiler-start 'cpu+mem)
(dotimes (_ 100)
(yas--post-command-handler))
(profiler-report)) I also run:
So thanks to your patch there is twice less garbage collection, but in the buffer my cursor is still slow to move unfortunately.. |
Are your benchmarks run without any active snippet? I wouldn't have thought there would be that much to do in that case. I've added a commit to #927 which avoids using |
I'm not sure what means exactly |
It means that you have expanded a snippet, and point is one of its fields.
Cool, so it was really just the looping over the overlays then. I thought there might be something else, since your profile report still listed 178M of allocation, and I didn't think calling |
No I didnt' have any active snippet during the benchmarks. |
Okay, I'm a little bit uncertain about how stable that patch will be, so I'm going to merge it only after releasing version 0.13, which I expect to do in a couple of weeks. |
Alright, no problem |
Hi,
I noticed that my cursor is very slow to move, it seems that yasnippet is allocating a lot of memory.
Moving the cursor from left to right on the same line produced this report:
This is in a buffer with lsp-mode (cquery). There are a lots of overlays (don't know if it is relevant):
yas--version: "0.12.2"
GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.26) of 2018-04-05
The text was updated successfully, but these errors were encountered: