On 21. nov. 2011 21:01, Abdelrazak Younes wrote:
On 21/11/2011 11:28, Helge Hafting wrote:
I failed to test the patch. It does not apply to the 2.1 sources, and
not 2.0.2 either.
There is nothing to apply, you just have to uncomment the definition of
USE_QIMAGE at the top of
GuiWorkArea_Private.h
Ok, I misunderstood. I have now tested, by loading the User Guide
in a large window, and scroll it to the bottom by holding
down the "page down" key. The results:
Fast machine, no USE_QIMAGE: 20s
Slow machine, no USE_QIMAGE: 200s
Slow machine, with USE_QIMAGE: 33s
The slow machine maxed out one processor core in either test,
but USE_QIMAGE gave a 6x speedup! LyX is actually snappy!
Another advantage of USE_QIMAGE is that page scrolling by
clicking inside the scrollbar actually _works_.
If I do this in the slow version, lyx scrolls - but it
takes so much time that the scrollbar autorepeats while
the graphics driver is busy, or
something like that. The result is that two (or occationally more)
screenfuls go by - instead of just one. No such problem
with USE_QIMAGE :-)
A third advantage of USE_QIMAGE: scrollwheel scrolling is
actually useful - because lyx seems to react immediately.
Without USE_QIMAGE, I roll the wheel for a while as
nothing happens, and then there is a huge jump more
than a page. With USE_QIMAGE, touching the wheel scrolls
a few lines - and so I can stop when I'm getting where
I want.
A fourth advantage: selecting with the mouse.
Without USE_QIMAGE: I press the mouse button, move
the mouse, and a selection appear a little later.
With USE_QIMAGE: I press the mouse button, move
the mouse, and the selection appear while I move
the mouse. In real time!
Fifth difference: drag the scrollbar through the document.
Without USE_QIMAGE: the screen is occationally redrawn.
Let go of the scrollbar, and it is redrawn again in yet
another place. If you're looking for something, you'll
overshoot by 5-10 pages due to display lag. Maybe you
won't see what you look for - you only get a page here
and a page there...
With USE_QIMAGE: the screen redraw very fast, similiar to
using the page_down key. Looking for stuff this way is
tricky, you don't get much time to see between redraws.
But if you stop for something you saw, you scroll just a little
back to get it.
The slow machine is a dual-core Dell latitude D830 2.4GHz, with a
nvidia quadro NVS 135M card, using nvidia's own
proprietary driver. (Open-source drivers
exists and is even slower.) It is kind of pathetic
for LyX - even a 32-bit 1.8GHz atom processor with integrated
graphichs is much faster. (For scrolling/graphics,
certainly not for compiling!)
I recommend that USE_QIMAGE gets enabled - at least
for linux compiles. For affected machines, this
is the difference between useful and annoyingly slow.
Helge Hafting