]> git.eshelyaron.com Git - emacs.git/commit
(load-path-filter-cache-directory-files): Filter only for `must-suffix`
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 31 May 2025 17:29:05 +0000 (13:29 -0400)
committerEshel Yaron <me@eshelyaron.com>
Sat, 7 Jun 2025 19:59:13 +0000 (21:59 +0200)
commit9834de67c41c5a5e73910691ad51441f585008fa
tree32971f8865cb119acfb0b9439888e374bc13d566
parent2024b5632f3494a60e8b781a7ef928af112b2f46
(load-path-filter-cache-directory-files): Filter only for `must-suffix`

Most loads set the `must-suffix` (e.g. `require and
`autoload-do-load`), but some don't (e.g. `load-library`).
This results in two separate entries in
`load-path-filter--cache` with two hash-tables.  The entry for
`must-suffix=nil` is larger and much less often used than the
other, so just skip filtering when `must-suffix=nil`.
Reduces the memory size of the cache from ~1MB to ~400kB in my
test case.

* lisp/startup.el (load-path-filter-cache-directory-files):
Don't use a filtering cache when `must-suffix` is nil.

(cherry picked from commit c3d9581f84107c2e137c71bb8fbf386bc20c944c)
lisp/startup.el