From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Building the web site is slow
Date: Mon, 23 Nov 2020 23:46:08 +0100 [thread overview]
Message-ID: <20201123224608.q3c2rd3ixuemoflo@pelzflorian.localdomain> (raw)
In-Reply-To: <877dqcjetd.fsf@inria.fr>
On Mon, Nov 23, 2020 at 04:03:26PM +0100, Ludovic Courtès wrote:
> Do you think we could arrange
> to build all the languages in a single ‘haunt build’ run, would that
> help?
What kept me from doing a single `haunt build` run are two things.
The lesser is that, when not using .guix.scm, running `haunt build`
builds only the current locale when testing, which is quick. Only
when building all languages via .guix.scm it becomes slow.
But the real reason for using multiple haunt invocations
is that the website i18n runs as a macro when
loading a Scheme file. That is, if a Scheme file contains
(G_ `(a (@ (href ,(guix-url "contribute/"))) "Git repositories"))
then the G_ macro will use gettext with the currently set locale to
change it to, for example
`(a (@ (href ,(guix-url "contribute/"))) "repositorios Git")
All this runs at macro expansion time before procedure calls like
guix-url unlike regular gettext. That is, it runs when Haunt first
processes the G_. If the same invocation of Haunt is to process the
G_ for multiple translations, it would somehow have to unload and
macro expand the code a second time.
Anyway, I am not sure the `haunt build` runs are the culprit. If it
is a problem with spinning disks only, maybe .guix.scm can be made to
copy less from the same disk to the same disk but copy more from disk
to a file system in RAM and from a file system in RAM to disk.
> I haven’t tried profiling yet, but I can take a look.
>
> Ludo’.
It is funny, when I try to profile via
cd ~/src/guix-artwork/website
guix install -p haunt-profile guile-syntax-highlight guile-commonmark haunt
LC_ALL=en_US.utf8 \
GUILE_LOAD_PATH=haunt-profile/share/guile/site/3.0:$GUILE_LOAD_PATH \
/gnu/store/18hp7flyb3yid3yp49i6qcdq0sbi5l1n-guile-3.0.2/bin/guile
scheme@(guile-user)> ,profile ((@ (haunt ui) haunt-main) "haunt" "build")
it crashes, but only when using ,profile. I will investigate
tomorrow.
Regards,
Florian
next prev parent reply other threads:[~2020-11-23 22:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-23 15:03 Building the web site is slow Ludovic Courtès
2020-11-23 22:46 ` pelzflorian (Florian Pelz) [this message]
2020-11-23 22:54 ` pelzflorian (Florian Pelz)
2020-11-24 20:27 ` pelzflorian (Florian Pelz)
2020-11-26 11:01 ` pelzflorian (Florian Pelz)
2020-11-27 10:27 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201123224608.q3c2rd3ixuemoflo@pelzflorian.localdomain \
--to=pelzflorian@pelzflorian.de \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).