(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)