all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: guix-devel <guix-devel@gnu.org>, myglc2 <myglc2@gmail.com>
Subject: Re: Performance of the man page database generation
Date: Tue, 16 May 2017 10:21:21 +0200	[thread overview]
Message-ID: <87tw4lb4am.fsf@gnu.org> (raw)
In-Reply-To: <87fug8j704.fsf@gmail.com> (Maxim Cournoyer's message of "Sat, 13 May 2017 23:18:51 -0700")

Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

> 18 man subdirectories contained newer manual pages.
> 3943 manual pages were added.
> find-files: /gnu/store/5mk4lg1rdzq2p3148idjd4z0bvif0nf4-gimp-2.8.18/share/man/man1/gimp-console.1: No such file or directory
> guix build: error: build failed: derivation `/gnu/store/vk10zmd5nm8kppd0f655fraradr019fq-manual-database.drv' may not be deterministic: output `/gnu/store/lmf9rfzj565m31xzhhlam3lk91bjbqsm-manual-database' differs
>
> real    0m39.890s
> user    0m0.356s
> sys     0m0.040s

Not good!

> As you can see, mandb stumbled more than once with some of our packages'
> manpages. Those failures are probably attributable to bad packages
> manual pages. For example, the gcc manual pages are known to be broken
> for example. [0]
>
> By looking at the output as it was generated, it seemed as if those
> failures caused mandb to take more time.

That would be surprising no?

> Another reason could be that mandb is just inefficient. There's an old
> bug about mandb's use of processes being less than optimal ("strace
> indicates that mandb is forking on the order of four processes per
> page") [1]. It seems that Colin Watson had a good idea of how to improve
> things but didn't get around to implementing it yet.

Yeah, I noticed that it was forking a lot by looking at the process
graph in gkrellm.  That’s not good.

The database creation is probably not rocket science, so I wonder if we
could implement it more efficiently in Guile using the appropriate gdbm
or bdb bindings.  Certainly we could avoid the forks.

Alternately we optimize mandb itself directly and contribute it
upstream, which would be benefit everyone but might be trickier.

Thoughts?

Ludo’.

  parent reply	other threads:[~2017-05-16  8:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170405205638.12336.78854@vcs0.savannah.gnu.org>
     [not found] ` <20170405205640.15AE6210A4@vcs0.savannah.gnu.org>
2017-04-08 19:29   ` 04/06: profiles: Generate database file for man pages Leo Famulari
2017-04-10  1:00     ` Maxim Cournoyer
2017-04-09 17:28   ` myglc2
2017-04-10  1:22     ` Maxim Cournoyer
2017-04-10  1:45       ` myglc2
2017-04-15  0:25         ` Maxim Cournoyer
2017-04-20  9:29           ` Performance of the man page database generation Ludovic Courtès
2017-05-14  6:18             ` Maxim Cournoyer
2017-05-14 15:31               ` myglc2
2017-05-15 16:23                 ` bug#26942: [PATCH] Add Add elapsed time to manual-database hook to output message (was: Performance of the man page database generation) Maxim Cournoyer
2017-05-16 21:12                   ` bug#26942: [PATCH] Add Add elapsed time to manual-database hook to output message Ludovic Courtès
2017-05-30 21:29                     ` Ricardo Wurmus
2017-05-16  8:21               ` Ludovic Courtès [this message]
2017-05-16 17:24                 ` Performance of the man page database generation Maxim Cournoyer

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tw4lb4am.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    --cc=myglc2@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.