GNU bug report logs - #53765
[PATCH 00/17] Remove limitations on clojure-tools

Previous Next

Package: guix-patches;

Reported by: Reily Siegel <mail <at> reilysiegel.com>

Date: Fri, 4 Feb 2022 00:23:01 UTC

Severity: normal

Tags: patch

Full log


Message #311 received at 53765 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Reily Siegel <mail <at> reilysiegel.com>, 53765 <at> debbugs.gnu.org
Subject: Re: [PATCH v2 05/18] gnu: Add clojure-core-memoize.
Date: Sat, 19 Mar 2022 20:46:23 +0100
[Message part 1 (text/plain, inline)]
Reily Siegel schreef op za 19-03-2022 om 20:07 [+0100]:
> When I first started running into these issues, I reached out to Clojure
> maintainers on the Clojurians Slack, and the response was that AOT
> compilation is only meant for complete applications to reduce startup
> latency, not individual libraries.

That seems backwards to me.  Wouldn't AOTing compiling individual
libraries be more efficient than AOTing individual applications?
More concretely:

Suppose app A and B consists of a single source file A.clj and B.clj
respectively, and each have library C (with C.clj) as dependency.
Then, what Guix currently does, is AOT'ing C.lj when building C, then
AOT'ing A.clj when building A and AOT'ing B when building B.
In total, AOT'ing a file happens thrice here.

What seems to be implied here, is that the AOT'ing needs to be delayed
to A and B.  In this case, C.clj would be AOT'd twice: once for A, and
once for B.  In total, AOT'ing a file happens four times here.

As such, wouldn't AOT'ing the applications instead of the libraries be
less efficient?

An additional problem here is grafting.  If the AOT'ing was delayed to
the application packages, then the libraries cannot be grafted, for the
same reason that (C, C++, Go, ...) static libraries cannot be grafted.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 58 days ago.

Previous Next


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