[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CVS directories in completion-ignored-extensions
From: |
Stefan Monnier |
Subject: |
Re: CVS directories in completion-ignored-extensions |
Date: |
Wed, 19 Jan 2005 09:57:04 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
> To me it seems like the regexp cache could be improved by
> keeping a usage counter and a lru timestamp so frequently
> used regexps could be kept in the cache -- and the cache
> could grow dynamically to always hold the most frequently
> used regexps [with some hard upper limit of course].
A cheap way to approximate something like that is to keep a `hit' flag
indicating whether this cache entry has ever been re-used. Upon GC remove
all entries for which `hit' is false and reset all `hit' flags to false.
I.e. only those entries that have been reused since the last GC survive.
> E.g. if I have a large number of regexps to split mail in gnus,
> it would be nice to keep all of those in the cache.
But of course a larger cache means slower lookup.
Stefan "who likes the idea of explicit regexp-compilation to
regexp-objects"