From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: [PATCH] Remove unecesssary invocations of org-mode in ox-publish Date: Tue, 29 Jul 2014 23:33:31 +0200 Message-ID: <8738djyhn8.fsf@bzg.ath.cx> References: <87mwbsn40z.fsf@fastmail.fm> <871tt4fggm.fsf@bzg.ath.cx> <87zjfsnsyf.fsf@fastmail.fm> <87fvhk9p0m.fsf@bzg.ath.cx> <87k36wnp7x.fsf@fastmail.fm> <877g2wyoyo.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCF1g-0004e3-LP for emacs-orgmode@gnu.org; Tue, 29 Jul 2014 17:33:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCF1b-0002P6-7v for emacs-orgmode@gnu.org; Tue, 29 Jul 2014 17:33:40 -0400 Received: from mail-s76.mailgun.info ([184.173.153.204]:54609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCF1b-0002BR-5B for emacs-orgmode@gnu.org; Tue, 29 Jul 2014 17:33:35 -0400 In-Reply-To: <877g2wyoyo.fsf@fastmail.fm> (Matt Lundin's message of "Tue, 29 Jul 2014 13:55:27 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matt Lundin Cc: Org Mode Hi Matt, Matt Lundin writes: > Please *do not apply* the previous patch. Instead, I've attached an > optimized version. Applied, thanks. > All in all this patch + commit 507244d56b055e7595ba94fe89d45c7ddb2559df > modestly improves the performance of org-publish-org-sitemap. On a > directory of 104 files, it used to take this long... > > org-publish-org-sitemap 1 10.508871433 10.508871433 > > ...to generate a sitemap. With this patch and commit 507244d, it takes > this long... > > org-publish-org-sitemap 1 7.700290794 7.700290794 > > Clearly, this is still very inadequate, but it is an improvement. I > would love to use the built in site-map functions, but they are simply > to slow for any larger projects. > > Could we do something like this to speed it up? > > (with-temp-buffer > (insert-file-contents file) > (goto-char (point-min)) > (when (re-search-forward "^#\\+TITLE:" nil t) > (org-element-at-point))) I guess so. But I'm in a rush and can't really check carefully. In the meantime, thanks for the recent patches! -- Bastien