-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Excessive call stack depth on saving #512
Comments
I think this is happening because micro serializes the undo stack and this means serializing every |
The only thing this would stop is having access to the undo stack across sessions? |
Yes, although I've looked at the code a bit more closely now and you would need to turn off both Perhaps this could be improved by separating cursor and undo files. |
I'm guessing the file you were editing in this case has a large undo stack because it's one you edit a lot so it has a lot of history built up. It's probably a good idea to have a limit to how far back the undo stack goes, i.e. 1000 changes or something like that. |
Does the undo stack get held in memory while micro is active? If so, then I'd suggest adding an option to the settings that takes an non-negative integer that sets the number of changes held (and if set to zero, doesn't limit the undo stack). |
I've since turned off these features and also removed the buffers directory from |
I think the high CPU usage is more related to gdamore/tcell#129 than the buffer serialization. |
:( |
Description of the problem or steps to reproduce
I noticed some seemingly excessive CPU usage from micro when doing some basic operations, so I captured a sample of the process. I have attached said sample, and it seems that micro enters an enormous call-stack when saving a file. I think this might be a problem with how the file is being serialized (using
encoding/gob
), not with micro's code. If you think I should be opening this issue on that library instead I can do that.sample.txt
Specifications
The text was updated successfully, but these errors were encountered: