1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Speed up loading modules

* src/lread.c (get-load-suffixes): Don't try loading modules with
suffixes from 'jka-compr-load-suffixes', since loading of
compressed shared libraries is not supported (so attempt to look
for them is just waste of cycles).  (Bug#78416.)
This commit is contained in:
Lin Sun 2025-05-14 06:30:34 +00:00 committed by Eli Zaretskii
parent da174e4a15
commit 9f1cec6297

View file

@ -1205,7 +1205,21 @@ This uses the variables `load-suffixes' and `load-file-rep-suffixes'. */)
Lisp_Object exts = Vload_file_rep_suffixes;
Lisp_Object suffix = XCAR (suffixes);
FOR_EACH_TAIL (exts)
lst = Fcons (concat2 (suffix, XCAR (exts)), lst);
{
Lisp_Object ext = XCAR (exts);
#ifdef HAVE_MODULES
if (SCHARS (ext) > 0
&& (suffix_p (suffix, MODULES_SUFFIX)
# ifdef MODULES_SECONDARY_SUFFIX
|| suffix_p (suffix, MODULES_SECONDARY_SUFFIX)
# endif
)
&& !NILP (Fmember (ext, Fsymbol_value (
Qjka_compr_load_suffixes))))
continue;
#endif
lst = Fcons (concat2 (suffix, ext), lst);
}
}
return Fnreverse (lst);
}
@ -5930,6 +5944,8 @@ the loading functions recognize as compression suffixes, you should
customize `jka-compr-load-suffixes' rather than the present variable. */);
Vload_file_rep_suffixes = list1 (empty_unibyte_string);
DEFSYM (Qjka_compr_load_suffixes, "jka-compr-load-suffixes");
DEFVAR_BOOL ("load-in-progress", load_in_progress,
doc: /* Non-nil if inside of `load'. */);
DEFSYM (Qload_in_progress, "load-in-progress");