Am Donnerstag, den 01.11.2018, 18:09 +0200 schrieb Guy Rutenberg:
> After some profiling the main culprit is the call to
> 
> get_containing_layout, which is apparently some kind of O(n^2). For
> example for de/Tutorial.lyx there are about ~5000 lines, and we
> indeed call during the conversion we call get_containing_layout 5285
> times. However, it calls find_end_of_layout a whopping 80936 times.

I wonder whether you actually need this. Wouldn't it be more efficient
to 
1. check whether the document uses Hebrew at all
and
2. If so, search for parentheses and then check whether they follow a
\\lang hebrew (and not any other \\lang) or whether they are in a
document with main language hebrew and do not follow any other \\lang?

Jürgen

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to