GNU bug report logs - #78416
[PATCH] * src/lread.c (get-load-suffixes): Avoid module suffix with compressed suffix

Previous Next

Package: emacs;

Reported by: Lin Sun <sunlin7 <at> hotmail.com>

Date: Wed, 14 May 2025 06:27:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 78416 <at> debbugs.gnu.org (full text, mbox):

From: Lin Sun <sunlin7 <at> hotmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Paul Eggert <eggert <at> cs.ucla.edu>, Po Lu
 <luangruo <at> yahoo.com>
Cc: "78416 <at> debbugs.gnu.org" <78416 <at> debbugs.gnu.org>
Subject: Re: bug#78416: [PATCH] * src/lread.c (get-load-suffixes): Avoid
 module suffix with compressed suffix
Date: Wed, 14 May 2025 13:40:15 +0000
From: Eli Zaretskii <eliz <at> gnu.org>
Sent: Wednesday, May 14, 2025 12:11 PM
> The issue is not specific to Windows, so I don't quite understand why
> you are talking about Windows and *.dll files.

It's not specific to Windows, but it's notable on Windows. 
My local build reduced calling CreateFile("X.dll.gz") for ~11000 time on startup, and startup time reduced from 4.122s  to 3.869s.

> ...are there any systems we know about where Emacs can
> load a compressed shared library whose file-name ends in ".gz" or any
> other suffix jka-compr supports? 
> ...
> However, the patch as it is isn't right, IMO: it's too general.

The patch corresponds to the lines in the Fload() function, it detects the "is_module" by module suffix, then call Fmodule_load(), that imply other suffix won't be considered as a module.

 1512 #ifdef HAVE_MODULES
 1513   bool is_module =
 1514     suffix_p (found, MODULES_SUFFIX)
 1515 #ifdef MODULES_SECONDARY_SUFFIX
 1516     || suffix_p (found, MODULES_SECONDARY_SUFFIX)
 1517 #endif
 1518     ;
...
 1726   if (is_module)
 1727     {
 1728 #ifdef HAVE_MODULES
 1729       loadhist_initialize (found);
 1730       Fmodule_load (found);
 1731       build_load_history (found, true);
 1732 #else
 1733       /* This cannot happen.  */
 1734       emacs_abort ();
 1735 #endif
 1736     }




This bug report was last modified 57 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.