[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Default history-length should be higher
From: |
Stefan Monnier |
Subject: |
Re: Default history-length should be higher |
Date: |
Sun, 26 Jan 2014 18:52:22 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> Code that creates a lot of objects would obviously be impacted
> significantly, since GC would be performed frequently.
C-h v gc- TAB will show you that gc-cons-threshold is only one part of
the story. As soon as the heap grows, gc-cons-percentage takes over.
I.e. by default, if your heap is 100MB big, GC will take place every
10MB (rather than every 0.8MB) of allocation.
Of course, maybe we should increase gc-cons-percentage. But part of the
reason for wanting frequent GCs is to try and mitigate the effects
of fragmentation. So, a higher gc-cons-threshold might speed up
initialization of `flx' but it might also cause your Emacs session to
use more VSZ and RSS, which will also tend to make each GC slower.
In reality for code that just allocates a large data-structure and not
much else, the best option is "never GC" (since every GC will just waste
time, since we only allocated but not freed anything), although clearly
in general this is not a good option.
In the case of `flx', maybe the best option is for it to let-bind
gc-cons-threshold around the code that "allocates without freeing".
Stefan
- Re: Default history-length should be higher, (continued)
- Re: Default history-length should be higher, Tom, 2014/01/25
- Re: Default history-length should be higher, Tom, 2014/01/25
- RE: Default history-length should be higher, Drew Adams, 2014/01/25
- Re: Default history-length should be higher, Michael Welsh Duggan, 2014/01/26
- Re: Default history-length should be higher, Bozhidar Batsov, 2014/01/26
- Re: Default history-length should be higher, Eli Zaretskii, 2014/01/26
- Re: Default history-length should be higher, Bozhidar Batsov, 2014/01/26
- Re: Default history-length should be higher, Óscar Fuentes, 2014/01/26
- RE: Default history-length should be higher, Drew Adams, 2014/01/26
- Re: Default history-length should be higher, Trent W. Buck, 2014/01/26
- Re: Default history-length should be higher,
Stefan Monnier <=