Closed ghost closed 1 year ago
After setting config.plugins.lsp.mouse_hover
to false
, the problem is gone, so it has something to do with the symbol hovering info
On every mouse move, this function gets invoked: https://github.com/lite-xl/lite-xl-lsp/blob/1eb5b431f91333650c35a04bc386a3b621235f2e/init.lua#L2314
Somewhere in there is the culprit
By the way I posted on the wrong issue before... Should have posted on this one.
Can confirm, I think I only tested the latest changes on Lite XL master
where it works fine. Will investigate.
From the other issue:
This other repo takes a more basic approach to hovering that doesn't involves the tokenizer...
The approach here involves the tokenizer only after the mouse stopped moving, or while the trigger is active only until the mouse is out of the token. Also considering that the tokenizer caches the results that are already on screen...
Just tested it again using the master
branch, and this time getting a different error (but no CPU spike)!:
Could you check if #77 fixes both this and #76 for you?
Just tested it again using the
master
branch, and this time getting a different error (but no CPU spike)!:
Could you open a separate issue about this?
I can't test if that pull fixes the issues because it'll result in the error I just opened the issue for
Let me know if you test with #77 (and #79 if needed) applied.
Tested with #77 and #79, and the CPU usage only increases a tiny bit (goes to ~25% of a single core).
As the title says, Lite-XL's CPU usage spikes when I wiggle my mouse around, both in the code section aswell as in the UI itself.
I have tested it with all plugins disabled (except for the
lsp
one), as well as with an empty configuration.It does NOT occur when the mouse is completely still, it only occurs when the mouse is moving around.
It ONLY occurs when the
lsp
plugin has been loaded, and not with any other pluginSystem and env info:
Linux host 6.1.60-0-lts #1-Alpine SMP PREEMPT_DYNAMIC Thu, 26 Oct 2023 06:31:03 +0000 x86_64 Linux
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
My config can be found here