[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Regex Speedup for org-refresh-category-properties.
From: |
Achim Gratz |
Subject: |
Re: [O] Regex Speedup for org-refresh-category-properties. |
Date: |
Tue, 29 Jul 2014 18:20:36 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.91 (gnu/linux) |
Malcolm Purvis 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.
I agree that this is faster, but it doesn't look right. Specifically I
don't think you are matching CATEGORY drawers any longer.
> - "^[ \t]*\\(#\\+CATEGORY:\\|[ \t]*:CATEGORY:\\)\\(.*\\)" nil t)
> + "^[ \t]*\\(#\\+CATEGORY:\\|*:CATEGORY:\\)\\(.*\\)" nil t)
I think that "^[ \t]*\\(\\(?:#\\+\\|:\\)CATEGORY:\\)\\(.*\\)" would be a
better regex, assuming that the original regex was doing the right thing.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptation for Waldorf Blofeld V1.15B11:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada