Den 15. juli 2015 23:41, skrev Jean-Marc Lasgouttes:
Le 15/07/2015 23:05, Sad Lyxer a écrit :
I create an empty file. Then I type "well, ", I copy that and then start
pasting it by keeping Ctrl-V down. When I have about 4 lines of wells I'm already noticing that every new instance appears slower and slower. The top utility shows lyx is using 100% CPU for this task. After a few more lines the speed is down to about 2 wells/second. When the wells are all pasted,
cpu usage returns to < 1%.

Hello,

I can unfortunately not reproduce this problem.
I see a milder case of this. (arch linux 64-bit, amd graphics) Pasting "well, " starts out fast and gets slower as the "wells" accumulate. In my case, it does not get extremely slow. So perhaps my machine is faster or the graphics driver nicer. The effect is noticeable both with 2.1.4 and 2.1.3. I also tried a remote connection (500km ssh). LyX is slower remote, but has nice enough performance to be useable. The slowdown effect is there, but does not seem worse. So the problem does not seem to be excessive communication - because that sort of thing gets real slow with ssh. (You do not want large images over ssh)

I can only guess this has something to do with paragraph breaking? As the "wells" accumulate, the paragraph gets longer and longer. I guess the X server is called to measure string lengths and the paragraph gets broken up for display. Perhaps there is some unnecessary effort here? Re-breaking the entire paragraph is certainly not necessary. When adding text, nothing seems to change except the last two lines (and any further lines, but there are none in this case.) Most of the lines stays exactly the same - perhaps caching is possible.

Helge Hafting

Reply via email to