[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Profiling of man-db database generation with zlib vs zstd
From: |
Ludovic Courtès |
Subject: |
Re: Profiling of man-db database generation with zlib vs zstd |
Date: |
Thu, 24 Mar 2022 22:37:15 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hi,
Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
> scheme@(guix man-db)> ,profile (define a (mandb-entries
> "/gnu/store/jgc63dxvpd8zq0p8al71x07a02qj8i1b-man-pages-5.13/share/man"))
> % cumulative self
> time seconds seconds procedure
> 20.95 1.98 1.75 gdbm.scm:122:11
> 20.95 1.75 1.75 string-tokenize
> 19.37 3.61 1.62 set-procedure-property!
> 6.72 0.56 0.56 ice-9/eval.scm:604:6
> 4.35 0.36 0.36 %read-line
> 4.35 0.36 0.36 anon #xa8e0b0
> 2.77 0.23 0.23 apply-smob/1
> 1.58 11.51 0.13 ice-9/eval.scm:292:11
Could it be that man-db.scm is being interpreted, hence eval.scm and
‘set-procedure-property!’ here? (Running ‘make’ doesn’t compile it.)
With a compiled man-db.scm, I get:
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,profile (define a (mandb-entries
"/gnu/store/jgc63dxvpd8zq0p8al71x07a02qj8i1b-man-pages-5.13/share/man"))
% cumulative self
time seconds seconds procedure
62.26 0.65 0.65 string-tokenize
11.32 0.12 0.12 anon #xc76118
3.77 0.16 0.04 ice-9/suspendable-ports.scm:651:0:read-delimited
3.77 0.04 0.04 open-file
1.89 1.35 0.02 /home/ludo/src/guix/guix/man-db.scm:161:4
1.89 0.04 0.02 stat
1.89 0.02 0.02 ice-9/popen.scm:183:0:reap-pipes
1.89 0.02 0.02 string->pointer
1.89 0.02 0.02 close-port
1.89 0.02 0.02 anon #xc760e0
1.89 0.02 0.02 fileno
1.89 0.02 0.02 string<?
1.89 0.02 0.02 ice-9/suspendable-ports.scm:203:4
1.89 0.02 0.02 lstat
0.00 1220.43 0.00 ice-9/boot-9.scm:220:5:map1
0.00 1.45 0.00 zlib.scm:217:0:call-with-gzip-input-port
0.00 1.05 0.00 <current input>:2756:9
0.00 0.12 0.00 ice-9/suspendable-ports.scm:70:0:read-bytes
0.00 0.12 0.00 port-read
0.00 0.12 0.00 zlib.scm:99:4
0.00 0.12 0.00 ice-9/suspendable-ports.scm:158:0:fill-input
0.00 0.08 0.00 zlib.scm:158:0:make-gzip-input-port
0.00 0.06 0.00
/home/ludo/src/guix/guix/man-db.scm:196:0:mandb-entries
0.00 0.04 0.00 zlib.scm:87:4
0.00 0.04 0.00
/home/ludo/src/guix/guix/man-db.scm:150:0:man-page->entry
0.00 0.04 0.00 /home/ludo/src/guix/guix/man-db.scm:191:0:man-files
0.00 0.04 0.00 ice-9/ftw.scm:445:2:loop
0.00 0.04 0.00 ice-9/boot-9.scm:1971:6
0.00 0.02 0.00 %after-gc-thunk
0.00 0.02 0.00 anon #xbbc5b0
0.00 0.02 0.00 ice-9/boot-9.scm:1689:4:with-exception-handler
0.00 0.02 0.00 guix/build/utils.scm:476:0:find-files
0.00 0.02 0.00 sort
0.00 0.02 0.00 filter
0.00 0.02 0.00 /home/ludo/src/guix/guix/man-db.scm:200:26
0.00 0.02 0.00 srfi/srfi-1.scm:452:2:fold
0.00 0.02 0.00 anon #xbbc53c
---
Sample count: 53
Total time: 1.049704017 seconds (0.358461379 seconds in GC)
--8<---------------cut here---------------end--------------->8---
More samples would give a more exploitable profile though.
HTH!
Ludo’.