-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
The reload operation takes up a lot of memory until the computer freezes #4228
Comments
It isn't an infinite amount of memory but it is quite a lot: for a text file with ~503MB, I see around 21GB of memory usage during the reload and 1GB after. It looks like |
I'm assuming that this is because of the timeout. After 1 second, all diff operations turn into insertions and deletions as a fast path. And since this is per char, it can get pretty big. Alternatively, these lines may be the culprit: helix/helix-core/src/transaction.rs Lines 476 to 478 in e16c632
|
Thanks for your reply. It seems that I misunderstood the reload operation. I thought it was just reopening the file. |
The rsync algorithm is an option for more efficient reloading as well. |
Summary
Opening a file with a size of 500M, executing the reload operation will take up much more memory than the file size and keep increasing until all the memory is used up
Reproduction Steps
I tried this:
hx 1.txt
reload
I expected this to happen:
reload 1.txt
Instead, this happened:
hx used up all memory
Helix log
~/.cache/helix/helix.log
Platform
macOS
Terminal Emulator
zsh 5.8.1
Helix Version
helix 22.08.1
The text was updated successfully, but these errors were encountered: