[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] Fix massive slowdown in org-id-find
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [PATCH] Fix massive slowdown in org-id-find |
Date: |
Mon, 23 Mar 2015 23:13:28 +0100 |
Hello,
Florian Beck <address@hidden> writes:
> the recent changes in org-id (presumably
> 8cdb2eef0f9f98f9e00a5e689decfe341fe0c6ec) lead to a massive slowdown.
Would you mind elaborating a bit? Slow down doing what? In which cases?
Could you profile it?
> org-id-find is slow as it is, now I find it almost unusable.
>
> Attached patch provides a fix.
Thanks. However, your patch is (partly) wrong.
> - (re (org-re-property property nil (not value))))
> - (catch 'exit
> - (while (re-search-forward re nil t)
> - (when (if value (equal value (org-entry-get (point) property nil t))
> - (org-entry-get (point) property nil t))
> - (throw 'exit (progn (org-back-to-heading t) (point)))))))))
> + (re (org-re-property property nil (not value) value)))
> + (when (re-search-forward re nil t)
> + (org-back-to-heading t)
> + (point)))))
Here, it catches false positives, e.g., lines looking like properties in
example blocks. It also overlooks accumulated values. It should fail
with "make test".
However, the optional VALUE argument is nice (I think some profiling
would still be welcome, tho).
Regards,
--
Nicolas Goaziou
- [O] [PATCH] Fix massive slowdown in org-id-find, Florian Beck, 2015/03/23
- Re: [O] [PATCH] Fix massive slowdown in org-id-find,
Nicolas Goaziou <=
- Re: [O] [PATCH] Fix massive slowdown in org-id-find, Sebastien Vauban, 2015/03/24
- Re: [O] [PATCH] Fix massive slowdown in org-id-find, Florian Beck, 2015/03/24
- Re: [O] [PATCH] Fix massive slowdown in org-id-find, Florian Beck, 2015/03/24
- Re: [O] [PATCH] Fix massive slowdown in org-id-find, Jacob Nielsen, 2015/03/25
- Re: [O] [PATCH] Fix massive slowdown in org-id-find, Nicolas Goaziou, 2015/03/25
- Re: [O] [PATCH] Fix massive slowdown in org-id-find, Florian Beck, 2015/03/30
- Re: [O] [PATCH] Fix massive slowdown in org-id-find, Nicolas Goaziou, 2015/03/31