From: "Jérémy Compostella" <jeremy.compostella@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org-babel-exp-lob-one-liners should not parse the entire buffer.
Date: Thu, 24 Nov 2011 16:56:11 +0100 [thread overview]
Message-ID: <ysmzkflh5us.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 909 bytes --]
All,
I'm currently generating a road book for a trip from different Org-Mode
file and other data. It results in a 13 thousands lines Org-Mode file
and I have some performance issues. Using the ELP package, I isolated
the two main bottlenecks.
1. One is in org-odt : the org-odt-write-manifest-file function is
called once and takes 5.546672 seconds to write a 167 lines file. I
rewrote this function and now it takes 0.01606 seconds to write the
same file. As usually for this package, I directly send the patch to
the org-odt author.
2. The other is in ob-exp : the org-babel-exp-lob-one-liners parse to
the end of the buffer instead of the region given as arguments. On my
"big" file it results in 50 seconds execution of the
org-babel-exp-lob-one-liners function. With the patch it only takes
0.871 seconds.
Please merge it or review it.
Regards,
Jeremy
--
Sent from my Emacs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch: org-babel-exp-lob-one-liners should not parse the entire buffer --]
[-- Type: text/x-diff, Size: 1013 bytes --]
From 86bd70539203443679fd55788db2a598529135d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Compostella?= <jeremy.compostella@gmail.com>
Date: Thu, 24 Nov 2011 16:20:00 +0100
Subject: [PATCH] org-babel-exp-lob-one-liners should not parse the entire
buffer.
The org-babel-exp-lob-one-liners search "call" pattern through the entire
buffer instead of the region given as arguments.
---
lisp/ob-exp.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index f2e20a0..de3a4c8 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -167,7 +167,7 @@ options are taken from `org-babel-default-header-args'."
(save-excursion
(goto-char start)
(while (and (< (point) end)
- (re-search-forward org-babel-lob-one-liner-regexp nil t))
+ (re-search-forward org-babel-lob-one-liner-regexp end t))
(unless (org-babel-in-example-or-verbatim)
(let* ((lob-info (org-babel-lob-get-info))
(inlinep (match-string 11))
--
1.7.5.4
next reply other threads:[~2011-11-24 15:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-24 15:56 Jérémy Compostella [this message]
2011-11-24 18:28 ` [PATCH] org-babel-exp-lob-one-liners should not parse the entire buffer Jambunathan K
2011-11-24 19:40 ` Jérémy Compostella
2011-11-24 20:21 ` [odt] [PATCH] Anchoring image to a page Jambunathan K
2011-11-24 21:31 ` Jérémy Compostella
2011-12-26 11:01 ` Jambunathan K
2011-11-25 16:33 ` [PATCH] org-babel-exp-lob-one-liners should not parse the entire buffer Eric Schulte
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ysmzkflh5us.fsf@gmail.com \
--to=jeremy.compostella@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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 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).