09/04/2013 23:12, pdv:
I've adapted rowBreakPoint() and also removed the following call to
rowWidth(), where the same calculations are done again.
The on screen layout is now OK, except for a small remaining issue with
RTL-languages.

Yes, we should not have several pieces of code that do the same calculations. What is the data structure that you use to remember the row characteristics?

I also notice that the inlineCompletion code is polluting the TextMetrics code, I wonder why the completion string is not just inserted in the paragraph and removed by the DEPM mechanism. I suspect this would be cleaner.

Unfortunately the extra time taken to calculate the correct widths in
rowBreakPoint() eats too much of the time gained gained by avoiding
single_character_painting and although still somewhat faster than before
I find the scrolling speed again no longer acceptable.

It looks indeed that this can only be solved by caching the widths.

Yes, probably. Remember also that a bit of profiling can help. Just reconfigure with --enable-build-type=prof and use Shark.app on LyX.

Finally, there is probably some parallel effort from Lin Wei (look for the "Word wrapping problem" thread) for breaking rows properly in chinese/english documents. I suspect that this work will become easier to get right after you have put all the word breaking code in one place.

JMarc

Reply via email to