From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Reworking loaddefs.el generation Date: Wed, 01 Jun 2022 14:07:22 +0300 Message-ID: <83ilpkhcb9.fsf@gnu.org> References: <87ee0f8cvx.fsf@gnus.org> <87ee092cfy.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9149"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, acm@muc.de, emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 01 13:32:13 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nwMaD-0002Eg-31 for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Jun 2022 13:32:13 +0200 Original-Received: from localhost ([::1]:54368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwMaB-0004Tz-OU for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Jun 2022 07:32:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwMC8-0003cu-Me for emacs-devel@gnu.org; Wed, 01 Jun 2022 07:07:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59492) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwMC6-0006eu-78; Wed, 01 Jun 2022 07:07:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qE9sHU/YE0S8aBedSKgi/RODY6jsXxGXtKCBMJ2TAeo=; b=WxNYLrnmxEDB t47x6rYJoZUUiYAlmB8343qCrOjb2x5fyvjNIaYDcWDq6nilyq0s6cvvQR9SwdORU+G7Ed/xCrM+2 P5265PDoTcokeNwS1MN5ahRtFtD3yfsoRMl8SNSbTJk77PFJJieExDsjfOSZvAKfj6wwqEXEiEEbn wESZWNia4Dl039PQU/ZRNQY9Ht1r21nSqR+s+nY4tyI6ItBd5KjN78u7sPI99x5w9GxvhLT0h4YG5 90axHbLIG1YBSlnVmFup0QupBrs7PCOCk97PrvmKj2wiwc/8XG4yUBT1epXwso26rJUZX4hL87pNJ /lLZcV67MGgA1LOcKvzWKg==; Original-Received: from [87.69.77.57] (port=2474 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwMC3-0008FB-Jf; Wed, 01 Jun 2022 07:07:17 -0400 In-Reply-To: <87ee092cfy.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 01 Jun 2022 07:13:37 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:290478 Archived-At: > From: Lars Ingebrigtsen > Cc: Alan Mackenzie , emacs-devel@gnu.org > Date: Wed, 01 Jun 2022 07:13:37 +0200 > > Stefan Monnier writes: > > > The generation of `org.texi` from `org.org` is excruciatingly > > slow, indeed. Maybe we can better hide that latency with a more careful > > scheduling, but maybe we could also try to speed it up: I mean if you > > compare it to the time it takes for texi2pdf to process the result it's > > rather shameful (after all, the generation of the `org.texi` seems > > algorithmically a lot simpler). > > If somebody want to poke at this, then perhaps this is a good starting > point: > > (progn > (require 'ox-texinfo) > (with-temp-buffer > (insert-file-contents "~/src/emacs/trunk/doc/misc/org.org") > (setq default-directory (expand-file-name "~/src/emacs/trunk/doc/misc/")) > (profiler-start 'cpu) > (org-export-to-file 'texinfo "/tmp/org.texi")) > (profiler-stop) > (profiler-report)) > > > 1564 19% - org-export-resolve-fuzzy-link > > looks pretty suspicious, for instance. (And that thing should have an > easier calling convention...) Instead of trying to speed up this conversion, we could divide org.org into 10 files, and prepare a Texinfo template that has the preamble and a series of 10 @include's, one each for every partial file. Then most builds would take 1/10th of the time we see now, since situations where more than one part will be modified are probably extremely rare.