3 ms·
Having a lot of RAM doesn't mean you have no need for garbage collection. By definition, garbage collected programs continuously leak memory, and consume all th
by sph 3y ago
Having a lot of RAM doesn't mean you have no need for garbage collection. By definition, garbage collected programs continuously leak memory, and consume all the available resources on the machine.
Even setting it to 256GB is a much better idea than just turning off GC. I recommend to maybe halve that to leave just enough RAM for Chrome.
- deleted 3y ago[deleted]
- dilap 3y agoi don't know, my experience in practice is that turning off emacs GC has resulting in no noticeable degradation and has eliminated GC pauses. so why not do it? maybe emacs just doesn't use enough memory, relative to modern systems, for GC to be worth it. (i do quit emacs at the end of each day, so that is a form of GC.)
- sph 3y agoThe memory consumption of GC languages with GC turned will never decrease, and basically keep increasing unless completely idle. Efficiency has nothing to do with it. conses are generated whether you want it or not, for every single line of Lisp executed.
- dilap 3y agosure, but if you're not generating enough garbage over the lifetime of the app for it to matter, why waste time collecting? especially is your collector is an old-school design that hangs the app for a user-noticeable amount of time...
- AeroNotix 3y agoNot everything in emacs is written in elisp. I can tell you _for sure_ that turning off GC in emacs doesn't result in a runaway train of resident memory. You can be incorrect, or you can try it.
- deleted 3y ago[deleted]
- adgjlsfhk1 3y agothis isn't true of all gc languages some (C# and Julia for example) are pretty good at preventing lots of allocations through optimizations.
- AeroNotix 3y agoRight, but if I have so much RAM available, it practically doesn't matter. I've been running emacs since I logged in at 9am, edited ~100 different files. Many LSP inferior-processes running and emacs is currently sitting at 1 whole gigabyte resident memory. What's more is that I would say this is a particularly light day for me and emacs. I have literally never, never, not once ever had an issue with this much RAM and essentially turning gc off in emacs.
- worthless-trash 3y ago> I've been running emacs since I logged in at 9am Yes, but which year ?
- AeroNotix 3y agoThis one.