emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents


From: Philip Kaludercic
Subject: Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
Date: Sat, 22 Oct 2022 13:45:00 +0000

Stefan Kangas <stefankangas@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> I've just tried replacing the 'pp' call with 'prin1' in elpa-admin's
>> `elpaa-update-archive-contents', and on my checkout the size dropped
>> from ~130 kb to 100 kb.  It is not much, but I don't understand why the
>> archive contents should be pretty printed, and even a few kilobyte less
>> can make a difference for some people.
>
> If we care about 30kb, how adding gzip support instead?

That is a good point, I have tried out a few different compression
algorithms on the archive contents generated with `prin1', and it seems
that bz2 would give the best results -- though in the end there is just
a difference of ±2kb:

  -rw-r--r-- 1 philip philip   100950 Oct 22 12:49 archive-contents
  -rw-r--r-- 1 philip philip    23952 Oct 22 12:49 archive-contents.bz2
  -rw-r--r-- 1 philip philip    28537 Oct 22 12:49 archive-contents.gz
  -rw-r--r-- 1 philip philip    25080 Oct 22 12:49 archive-contents.xz
  -rw-r--r-- 1 philip philip    26997 Oct 22 12:49 archive-contents.zst

I don't know if it makes sense to provide all of these, in case the
client doesn't have bz2 installed or if the overhead of trying out
multiple HTTP requests would outweigh the advantage of compressing in
the first place.

Another thing I just thought of is that HTTP can serve gzip'ed content,
but unless I am mistaken the elpa.gnu.org server doesn't make use of
this capability, even though url.el appears to send the right header
(Accept-Encoding: gzip).  My guess would be that enabling this would
improve the situation immediately more than any hacking on
elpa-admin.el/package.el.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]