GNU bug report logs - #78465
[PATCH] * src/lread.c (load): Try reuse the fd if it was opened in binary mode

Previous Next

Package: emacs;

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

Date: Sat, 17 May 2025 07:10:02 UTC

Severity: normal

Tags: patch, wontfix

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

Bug is archived. No further changes may be made.

Full log


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

From: Lin Sun <sunlin7 <at> hotmail.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: [PATCH] * src/lread.c (load): Try reuse the fd if it was opened in
 binary mode
Date: Sat, 17 May 2025 07:09:06 +0000
[Message part 1 (text/plain, inline)]
This patch will let Emacs avoid always close the fd then open the file with desired fmode in the "Fload" function on windows. It will reduce the counts on calling the "CreateFile" api.

On my dev windows environment, Emacs startup time reduces from 4.551s to 4.378s with 352 packages. 
[0001-src-lread.c-load-Try-reuse-the-fd-if-it-was-open-on-.patch (text/x-patch, attachment)]

This bug report was last modified today.

Previous Next


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