guix-devel
[Top][All Lists]
Advanced

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

Re: Building the web site is slow


From: pelzflorian (Florian Pelz)
Subject: Re: Building the web site is slow
Date: Tue, 24 Nov 2020 21:27:19 +0100

OK, I now believe `haunt build` is what costs the time.

On Mon, Nov 23, 2020 at 11:46:08PM +0100, pelzflorian (Florian Pelz) wrote:
> 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.

Negative, unless I misunderstood what /dev/shm is.  I did `time guix
build -f .guix.scm`:

real    7m3.909s
user    1m3.639s
sys     0m0.841s

Instead of `time` I now enclosed most of the build procedure in

(statprof (lambda () …))

%     cumulative   self
time   seconds     seconds  procedure
 18.62      2.13      2.11  ice-9/boot-9.scm:1738:4:throw
 14.81      1.68      1.68  display
 14.22      1.61      1.61  copy-file
  8.36      0.95      0.95  readdir
  6.89      0.78      0.78  mkdir
  4.11      0.47      0.47  opendir
  3.96      0.47      0.45  lstat
  2.20      0.25      0.25  ice-9/boot-9.scm:1202:6
  1.91      4.83      0.22  ice-9/boot-9.scm:1673:4:with-exception-handler
  1.91      0.22      0.22  string-append


I added at the beginning of the build procedure:

(let ((where "/dev/shm/website-construction-site"))
  (mkdir-p where)
  (chdir where))

Now I get

real    7m4.632s
user    1m4.254s
sys     0m0.744s

%     cumulative   self
time   seconds     seconds  procedure
 17.66      2.06      2.06  copy-file
 17.52      2.07      2.04  ice-9/boot-9.scm:1738:4:throw
  9.97      1.16      1.16  display
  8.40      0.98      0.98  mkdir
  8.26      0.98      0.96  readdir
  5.41      0.63      0.63  opendir
  3.85      0.46      0.45  lstat
  2.71      5.57      0.32  ice-9/boot-9.scm:1673:4:with-exception-handler
  2.14      0.25      0.25  string-append

I will instead try profiling haunt runs again.

Regards,
Florian



reply via email to

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