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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 14 May 2025 17:28:12 +0300

> From: Lin Sun <[email-masked]>
> CC: "[email-masked]" <[email-masked]>
> Date: Wed, 14 May 2025 13:40:15 +0000
> msip_labels:
> 
> From: Eli Zaretskii <[email-masked]>
> 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.

That's about 7% reduction in startup time.

> > ...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.

Yes, I know.  What I meant was that load-file-rep-suffixes aren't
necessarily about compression, they could be anything.  So if we want
to install such a change, it should filter out compression suffixes
like ".gz", not any suffix that happens to be in
load-file-rep-suffixes.