>> I noticed too that in sufficiently long Emacs sessions Lisp >> evaluation slows down. > > One possible situation where this could happen is if you customize > gc-cons-threshold to a large number.
Do you actually mean gc-cons-threshold customized to a *small* number? (or not customized at all since the default is quite a small number) In Emacs sessions with lots of Lisp objects every GC takes too much time. With the default value of `gc-cons-threshold' (or a smaller number) such slow GC running too often causes the slowdown of many normal operations (some of which even run GC several times during one Emacs command). It helps to increase the value of gc-cons-threshold at least tenfolds to run slow GC less often. (Maybe the value of `gc-cons-threshold' should grow gradually with the size of allocated Lisp data? The reason is that users allowing Emacs to grow to a large size can accept a large value of gc-cons-threshold.) Anyway, it would be good to mention this problem in the elisp manual. Currently it suggests increasing `gc-cons-threshold' for a program that creates lots of Lisp data. There are too many such Emacs packages, so this advice is not very useful. In addition to this problem, the manual could also mention the problem of GC duration increasing with the size of allocated Lisp objects. The advice for this problem could be the same: to set `gc-cons-threshold' to a larger value. -- Juri Linkov http://www.jurta.org/emacs/ _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel