From: Lars Ingebrigtsen Date: Thu, 2 Jun 2022 09:13:08 +0000 (+0200) Subject: Speed up loaddefs-generate on slow disks X-Git-Tag: emacs-29.0.90~1910^2~283 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=afc0bfd38076d8184c506d3f3c2e9f4313103c1b;p=emacs.git Speed up loaddefs-generate on slow disks * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Make file update comparisons faster. --- diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index e5a5c21d234..46aec173e86 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -522,11 +522,15 @@ If INCLUDE-PACKAGE-VERSION, include package version data." (byte-compile-info (concat "Scraping files for loaddefs")) 0 (length files) nil 10)) + (output-time + (file-attribute-modification-time (file-attributes output-file))) (file-count 0)) (dolist (file files) (progress-reporter-update progress (setq file-count (1+ file-count))) (when (or (not updating) - (file-newer-than-file-p file output-file)) + (time-less-p output-time + (file-attribute-modification-time + (file-attributes file)))) (setq defs (nconc (loaddefs-generate--parse-file file output-file