Hi All,

> It’s not like we cannot fix this by splitting the regexp manually into
> prefix tree.
>
> The question is performance though.

For reference, I ran into this issue with Org Glossary, and did exactly this:
see <https://github.com/tecosaur/org-glossary/blob/master/org-glossary.el#L804>.

I sort all the strings being matched with `string<' and then create clumps of 
~800
terms and then search with the constructed regex for each clump in turn.

Obviously this has a performance impact, but it seems to work well enough, and
working slower is clearly better than not working at all.

All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/tec>.

Reply via email to