GNU bug report logs - #70398
[PATCH 0/5] Reduce the size of gnu/packages/*.go files

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Mon, 15 Apr 2024 15:29:03 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Ricardo Wurmus <rekado <at> elephly.net>, Josselin Poiret <dev <at> jpoiret.xyz>, Mathieu Othacehe <othacehe <at> gnu.org>, Tobias Geerinckx-Rice <me <at> tobias.gr>, 70398 <at> debbugs.gnu.org, Christopher Baines <guix <at> cbaines.net>
Subject: [bug#70398] [PATCH 0/5] Reduce the size of gnu/packages/*.go files
Date: Mon, 15 Apr 2024 20:06:15 +0200
Hi,

On lun., 15 avril 2024 at 17:27, Ludovic Courtès <ludo <at> gnu.org> wrote:

> What follows is a bunch of tricks to reduce code bloat, achieving ~14%
> reduction in the size of .go files (~18% if we look at gnu/packages
> alone).

If have not checked that the reduction would be of ~18%.  From my
understanding, the patch set LGTM; modulo an unrelated comment about
ellipsis and potential quadratic penalty on performances.


> About 60% of those files are in the 64–128 KiB range.  Since ELF sections
> are currently 64 KiB-aligned (see ‘*lcm-page-size*’ in Guile), we would
> save space by ensuring these are sparse files.  To do that, we’ll need to
> detect holes when restoring nars and/or to change the nar format to
> preserve holes, while also ensuring that when the daemon copies files
> around, it also preserves holes.  Work for later!

Since [1], I think that compiling a generic Guile record for <package>
is touching the limit of DSL. :-) Other said, I think the binary
(compiled) representation of records <package> should be specific and
thus optimized.  Work for after later. ;-)

Cheers,
simon


1: How many bytes do we add (closure of guix) when adding one new package?
Simon Tournier <zimon.toutoune <at> gmail.com>
Thu, 25 May 2023 20:24:30 +0200
id:87r0r4uv4x.fsf <at> gmail.com
https://lists.gnu.org/archive/html/guix-devel/2023-05
https://yhetil.org/guix/87r0r4uv4x.fsf <at> gmail.com




This bug report was last modified 1 year and 7 days ago.

Previous Next


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