[Github-comments] [geany/geany] Added option to auto reload files changed on disk (#1246)

elextr notifications at xxxxx
Fri Sep 30 01:48:18 UTC 2016


> It looks to me like we can remove the auto_reload option and make it automatic
without data loss.

@shiftee two ways you can lose data with this scheme:

1) a modified file that has been saved (so the buffer is clean) and is then changed on disk may lose the changes that are still in the buffer if it always reloaded without asking. Think like "Oh, I'll just checkout file from Git to see what it has". Git replaces the modified file. Geany notices, reloads and BANG your changes are lost.

2) when the OOM killer closes geany without saving the files because it consumed too much memory :)

> I agree, but for the moment it's probably wise to keep it as is since it may cause high-memory usage.

Agree with @codebrainz that the option is needed, think of a log file that is constantly updating, it will keep reloading and then save each of the previous contents in the undo buffer in memory.  For a large logfile it could multiply memory usage very quickly.

> The only potential change I can think might be to change the default enabled/disabled state of it, or perhaps making it mutually exclusive with the new auto_reload option.

Would fix the memory usage, but then you would lose the undo protection against accidental reloads any time auto reload was on.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1246#issuecomment-250638892
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160929/7b89a98e/attachment.html>


More information about the Github-comments mailing list