Feature request: Zstd / lz4 compression

Bug #1881089 reported by Pierre Neidhardt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Wishlist
Unassigned

Bug Description

Currently the deflate (zlib) compression that's used by SBCL has one rather big downside: it slightly increases startup time. This is bound to happen because SBCL executable are always big.

A better option would be to use the lz4 or Zstd algorithms:
https://en.wikipedia.org/wiki/Zstandard

With such an algorithm, the startup time different might not be noticeable.

While on the topic, it could be useful to explain how to enable compression with ASDF in the manual:

#+sb-core-compression
(defmethod asdf:perform ((o asdf:image-op) (c asdf:system))
  (uiop:dump-image (asdf:output-file o c)
                   :executable t
                   :compression t))

Revision history for this message
Stas Boukarev (stassats) wrote :

Does it increase start up time because of the compression algorithm or because with compression the core file can't simply be mmaped?

Revision history for this message
Pierre Neidhardt (ambrevar) wrote :

I assume the compression algorithm is at play here, but I'm not sure how
to measure this.

Revision history for this message
Orivej Desh (orivej) wrote :

zlib indeed made sbcl startup unacceptably slow for my use case, and switching to lz4 made it fast enough. This was discussed in the "Interest in patch incorporating lz4?
" thread: https://sourceforge.net/p/sbcl/mailman/message/32989588/ and the patch is still available (although not updated) in https://github.com/orivej/sbcl/commit/lz4-squashed . I have not tested zstd at the time, but if sbcl was to add one new algorithm now, zstd probably suits it better.

Stas Boukarev (stassats)
Changed in sbcl:
importance: Undecided → Wishlist
Charles (karlosz)
Changed in sbcl:
status: New → Fix Committed
Revision history for this message
Pierre Neidhardt (ambrevar) wrote :

Excellent, thanks a lot, this is an amazing new addition to SBCL!

Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.