Subject: Re: bug#59692: 29.0.60; Reduce installation size by disabling byte-compilation for some lisp files that won't benefit

From: Eli Zaretskii <[email-masked]>
Date: Tue, 29 Nov 2022 22:18:01 +0200

severity 59692 wishlist
thanks

> Date: Wed, 30 Nov 2022 03:07:47 +0700
> From: daanturo <[email-masked]>
> 
> Recently, after each rebuild, I noticed that Emacs' total installation
> size has become bigger overtime. That's understandably unavoidable but
> there's room for improvement. By analyzing disk usage I discovered
> that:
> 
> "lisp/leim/"'s compiled elisp files are taking the most significant disk
> storage.
> 
> By inspecting some of those, I don't think we are able to gain any
> practical benefit by compiling them, they don't contain (~)any
> function/macro definitions at all.
> 
> So I try to disable byte-compilation (by either dir-local vars or
> file-local vars) in:
> 
> - lisp/leim/ : I disable for the whole directory
> 
> And some more .el(s) that I don't find so essential to compile:
> 
> - lisp/play/ : not so serious or critical to workflows
> 
> - lisp/cedet/{ede,semantic,srecode}/ : we now have LSP/eglot!
> - lisp/cedet/{ede.el,semantic.el} : same as above, also a big file by
> itself
> 
> (I wished pulse.el, mode-local.el, data-debug.el were moved out of this
> lisp/cedet/, then putting a single .dir-local.el there would be the
> simplest)
> 
> - lisp/obsolete/ : already obsolete anyway, but some packages may still
> depend on them so no-native-compile only
> 
> Then build Emacs again.
> 
> The final size of my Emacs installation, compared to before applying
> those no-compile local variables:
> 298.79 MiB -> 253.09 MiB
> That's 45.7 MiB disk saved. About 15.3% of total shaved!
> 
> Please consider at least "lisp/leim/"'s gigantic files such as
> "ZIRANMA.el", "ARRAY30.el", "ja-dic.el" ,etc. as I find those the most
> disk-expensive when compiled, yet questionable benefit and waste of time
> spending to build.

Thanks.

FWIW, I consider this to be a waste of our resources and a long-term
maintenance burden that I cannot justify, even if I accept your conclusions
(and I'm not at all convinced that they are completely correct, especially
since you didn't show any measurements of code speed with and without
byte-compilation).  50 MiB of disk space is too small to justify keeping
track of all the files, making decisions which will and will not be
compiled, etc.  Disk space is cheap these days.

So I don't think we should do this.