emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C-h f now permanently loads ~2MB


From: Stefan Monnier
Subject: Re: C-h f now permanently loads ~2MB
Date: 24 Apr 2004 19:19:50 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> If the 2MB buffer is a huge concern, then enable it with a variable, and make
> the default `off'.

I designed the feature so as to minimize the impact on the Emacs user rather
than the Emacs developer.  I.e. it takes zero additional space in the
`emacs' binary, zero additional heap space if the feature is off
(e.g. if the C source directory can't be found) and ridiculously tiny (less
than 20KB and that could be easily reduced to <4KB) additional disk space to
keep the extra info.

I agree that a 2MB buffer is a fairly hefty price to pay if you don't
actually use the feature.  I figured that the "source C directory found"
heuristic should be good enough, but maybe it enables the feature
too eagerly.  One possibility is to replace the

        defined in `src/foo.c'
by
        defined in `C source code'

so we'd only load the 2MB buffer when the user clicks on the hyperlink
rather than when she does the C-h f.

A simpler one is to keep the code as is but turn it off by default
and let Miles and others turn it on explicitly.

In my experience an extra 2MB buffer is not that big a deal: GC-wise it does
not cost more than a 1byte buffer, and if unused it'll be paged out.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]