guix-devel
[Top][All Lists]
Advanced

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

Re: Performance of the man page database generation


From: myglc2
Subject: Re: Performance of the man page database generation
Date: Sun, 14 May 2017 11:31:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

On 05/13/2017 at 23:18 Maxim Cournoyer writes:

> Hello!
>
> address@hidden (Ludovic Courtès) writes:
>
>> Hello,
>>
>> Maxim Cournoyer <address@hidden> skribis:
>>
>>> myglc2 <address@hidden> writes:
>>
[...]
>>> 50 seconds for 33 packages on such a powerful machine seems abnormal,
>>> unless you have a specific package(s) which would install an unusually
>>> large amount of manual pages (which would take more time to be indexed).
>>>
[...]
>>
>> You can see those .drv names when building the profile.  So you just
>> need to copy/paste them and run “guix build --check” above.
>>
>> If you have the profile but not its .drv, you can find out what the .drv
>> for that profile was but there’s no command-line interface for that (you
>> have to use ‘valid-derivers’ from (guix store).)
>>
>> HTH,
>> Ludo’.
>
> Thanks Ludovic; that was helpful.
>
> I did a small test and it takes about 40 s on my system, with 60
> packages or so in my profile. I removed the "--quiet" flag of mandb in
> the profile hook (guix profile) to see the output of mandb while it was
> indexing the manual pages:
>
> time guix build --check 
> /gnu/store/vk10zmd5nm8kppd0f655fraradr019fq-manual-database.drv
[...]
> real    0m39.890s
> user    0m0.356s
> sys     0m0.040s
>
[...]

Hi Maxim and Ludo’,

I hacked profiles.scm (please see git diff below) so that start and end
seconds appear in the message like this:

creating manual page database for 23 packages...1494773268...1494773275 DONE

I tested a few cases and man-db typically takes only a few seconds.  It
only _appears_ to take a long time because other processing occurs after
the man-db command.

So, I suggest either ...

1) delete the message altogether, or
2) close the message with a "DONE"

SORRY for the run-around. In my defense, when I first raised the
question I did suggest the idea of closing the message:

http://lists.gnu.org/archive/html/guix-devel/2017-04/msg00196.html

HTH, George

address@hidden ~/src/guix [env]$ git diff
diff --git a/guix/profiles.scm b/guix/profiles.scm
index eb172ef45..4dbf44a81 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1011,13 +1011,15 @@ the entries in MANIFEST."
         (mkdir-p man-directory)
         (setenv "MANPATH" (string-join entries ":"))
 
-        (format #t "creating manual page database for ~a packages...~%"
-                (length entries))
+        (format #t "creating manual page database for ~a packages...~a"
+                (length entries)(current-time))
         (force-output)
 
         (zero? (system* #+(file-append man-db "/bin/mandb")
                         "--quiet" "--create"
-                        "-C" "man_db.conf"))))
+                        "-C" "man_db.conf"))
+        (format #t "...~a DONE~%" (current-time))
+        (force-output)))
 
   (gexp->derivation "manual-database" build
                     #:modules '((guix build utils)
address@hidden ~/src/guix [env]$ 



reply via email to

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