* [PATCH] * org-publish.el (org-publish-find-date): optimization
@ 2011-04-19 15:41 Manuel Giraud
2011-04-19 16:12 ` Bernt Hansen
2011-05-02 9:13 ` [Accepted] " Carsten Dominik
0 siblings, 2 replies; 4+ messages in thread
From: Manuel Giraud @ 2011-04-19 15:41 UTC (permalink / raw)
To: emacs-orgmode; +Cc: Manuel Giraud
Hi,
elp reports important speed gain with this patch to find an org file date.
---
lisp/org-publish.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lisp/org-publish.el b/lisp/org-publish.el
index e944eea..7470ee2 100644
--- a/lisp/org-publish.el
+++ b/lisp/org-publish.el
@@ -852,7 +852,7 @@ system's modification time.
It returns time in `current-time' format."
(let ((visiting (find-buffer-visiting file)))
(save-excursion
- (switch-to-buffer (or visiting (find-file file)))
+ (switch-to-buffer (or visiting (find-file-noselect file nil t)))
(let* ((plist (org-infile-export-plist))
(date (plist-get plist :date)))
(unless visiting
--
1.7.3.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] * org-publish.el (org-publish-find-date): optimization
2011-04-19 15:41 [PATCH] * org-publish.el (org-publish-find-date): optimization Manuel Giraud
@ 2011-04-19 16:12 ` Bernt Hansen
2011-04-19 16:27 ` Manuel Giraud
2011-05-02 9:13 ` [Accepted] " Carsten Dominik
1 sibling, 1 reply; 4+ messages in thread
From: Bernt Hansen @ 2011-04-19 16:12 UTC (permalink / raw)
To: Manuel Giraud; +Cc: emacs-orgmode
Manuel Giraud <manuel.giraud@univ-nantes.fr> writes:
> Hi,
>
> elp reports important speed gain with this patch to find an org file date.
Hi Manual,
It would be useful to post the elp results too so we can see the
differences before and after your patch.
Regards,
Bernt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] * org-publish.el (org-publish-find-date): optimization
2011-04-19 16:12 ` Bernt Hansen
@ 2011-04-19 16:27 ` Manuel Giraud
0 siblings, 0 replies; 4+ messages in thread
From: Manuel Giraud @ 2011-04-19 16:27 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode
Bernt Hansen <bernt@norang.ca> writes:
> Manuel Giraud <manuel.giraud@univ-nantes.fr> writes:
>
>> Hi,
>>
>> elp reports important speed gain with this patch to find an org file date.
>
> Hi Manual,
>
> It would be useful to post the elp results too so we can see the
> differences before and after your patch.
Right. Here there are:
org-publish-find-date-before 100 0.5272890000 0.0052728900
org-publish-find-date-after 100 0.2037700000 0.0020377000
Done with:
(dotimes (n 100)
(org-publish-find-date-before "~/foo.org")
(org-publish-find-date-after "~/foo.org"))
and foo.org is about 300 lines.
--
Manuel Giraud
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Accepted] * org-publish.el (org-publish-find-date): optimization
2011-04-19 15:41 [PATCH] * org-publish.el (org-publish-find-date): optimization Manuel Giraud
2011-04-19 16:12 ` Bernt Hansen
@ 2011-05-02 9:13 ` Carsten Dominik
1 sibling, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2011-05-02 9:13 UTC (permalink / raw)
To: emacs-orgmode
Patch 753 (http://patchwork.newartisans.com/patch/753/) is now "Accepted".
Maintainer comment: none
This relates to the following submission:
http://mid.gmane.org/%3C1303227689-950-1-git-send-email-manuel.giraud%40univ-nantes.fr%3E
Here is the original message containing the patch:
> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] * org-publish.el (org-publish-find-date): optimization
> Date: Tue, 19 Apr 2011 20:41:29 -0000
> From: Manuel Giraud <manuel.giraud@univ-nantes.fr>
> X-Patchwork-Id: 753
> Message-Id: <1303227689-950-1-git-send-email-manuel.giraud@univ-nantes.fr>
> To: emacs-orgmode@gnu.org
> Cc: Manuel Giraud <manuel.giraud@univ-nantes.fr>
>
> Hi,
>
> elp reports important speed gain with this patch to find an org file date.
>
> ---
> lisp/org-publish.el | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lisp/org-publish.el b/lisp/org-publish.el
> index e944eea..7470ee2 100644
> --- a/lisp/org-publish.el
> +++ b/lisp/org-publish.el
> @@ -852,7 +852,7 @@ system's modification time.
> It returns time in `current-time' format."
> (let ((visiting (find-buffer-visiting file)))
> (save-excursion
> - (switch-to-buffer (or visiting (find-file file)))
> + (switch-to-buffer (or visiting (find-file-noselect file nil t)))
> (let* ((plist (org-infile-export-plist))
> (date (plist-get plist :date)))
> (unless visiting
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-02 9:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-19 15:41 [PATCH] * org-publish.el (org-publish-find-date): optimization Manuel Giraud
2011-04-19 16:12 ` Bernt Hansen
2011-04-19 16:27 ` Manuel Giraud
2011-05-02 9:13 ` [Accepted] " Carsten Dominik
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).