From mboxrd@z Thu Jan 1 00:00:00 1970 From: myglc2 Subject: Re: Performance of the man page database generation Date: Sun, 14 May 2017 11:31:08 -0400 Message-ID: <8637c7cv5v.fsf@gmail.com> References: <20170405205638.12336.78854@vcs0.savannah.gnu.org> <20170405205640.15AE6210A4@vcs0.savannah.gnu.org> <86y3v9bicq.fsf@gmail.com> <864lxxghmm.fsf@gmail.com> <87a87ibjq1.fsf@gmail.com> <871ssn4ebg.fsf_-_@gnu.org> <87fug8j704.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9vUI-0006sD-OE for guix-devel@gnu.org; Sun, 14 May 2017 11:31:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9vUE-00054a-PV for guix-devel@gnu.org; Sun, 14 May 2017 11:31:14 -0400 In-Reply-To: <87fug8j704.fsf@gmail.com> (Maxim Cournoyer's message of "Sat, 13 May 2017 23:18:51 -0700") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Maxim Cournoyer Cc: guix-devel On 05/13/2017 at 23:18 Maxim Cournoyer writes: > Hello! > > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Hello, >> >> Maxim Cournoyer skribis: >> >>> myglc2 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 =E2=80=9Cguix build --check=E2=80=9D abo= ve. >> >> If you have the profile but not its .drv, you can find out what the .drv >> for that profile was but there=E2=80=99s no command-line interface for t= hat (you >> have to use =E2=80=98valid-derivers=E2=80=99 from (guix store).) >> >> HTH, >> Ludo=E2=80=99. > > 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-manua= l-database.drv [...] > real 0m39.890s > user 0m0.356s > sys 0m0.040s > [...] Hi Maxim and Ludo=E2=80=99, 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 g1@g1 ~/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 ":")) =20 - (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) =20 (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))) =20 (gexp->derivation "manual-database" build #:modules '((guix build utils) g1@g1 ~/src/guix [env]$=20