From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Regex Speedup for org-refresh-category-properties.
Date: Tue, 29 Jul 2014 10:47:11 -0400 [thread overview]
Message-ID: <871tt4jk7k.fsf@alphaville.bos.redhat.com> (raw)
In-Reply-To: m261igx25h.fsf@purvis.id.au
Malcolm Purvis <malcolm@purvis.id.au> writes:
> I use the master version of org, and some months ago the time required
> to generate my custom agenda view sky rocketed. I've found that 90% of
> the time was being spent in the call to re-search-forward in
> org-refresh-category-properties. The patch below speeds up the regular
> expression search and makes the generation of my agenda as fast as
> before.
>
> Malcolm
>
> diff --git a/lisp/org.el b/lisp/org.el
> index 7e30061..2fc6854 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -9474,7 +9474,7 @@ The refresh happens only for the current tree (not subtree)."
> (goto-char (point-min))
> (put-text-property (point) (point-max) 'org-category def-cat)
> (while (re-search-forward
> - "^[ \t]*\\(#\\+CATEGORY:\\|[ \t]*:CATEGORY:\\)\\(.*\\)" nil t)
> + "^[ \t]*\\(#\\+CATEGORY:\\|*:CATEGORY:\\)\\(.*\\)" nil t)
^
^
What does the asterisk do?
Can you explain what this regexp is supposed to match?
Thanks,
Nick
next prev parent reply other threads:[~2014-07-29 14:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 3:41 Regex Speedup for org-refresh-category-properties Malcolm Purvis
2014-07-29 13:23 ` Bastien
2014-07-29 14:47 ` Nick Dokos [this message]
2014-07-29 14:56 ` Bastien
2014-07-29 16:20 ` Achim Gratz
2014-07-29 21:28 ` Bastien
2014-07-29 23:46 ` Malcolm Purvis
2014-07-30 7:17 ` Achim Gratz
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=871tt4jk7k.fsf@alphaville.bos.redhat.com \
--to=ndokos@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).