On 06/09/2011 04:03 PM, Stephan Witt wrote:
Am 09.06.2011 um 20:21 schrieb Peter Kümmel:
On 09.06.2011 08:12, Stephan Witt wrote:
To investigate the recently mentioned scrolling problems I did some profiling
on my machine.
See http://www.mail-archive.com/lyx-users@lists.lyx.org/msg87278.html
Ok, it's a completely different environment (Mac, Qt-4.6-Cocoa, SVN-trunk)
but it's interesting too. To scroll with Page-Down through the Users Guide
completely
I have to wait appr. 20 or 30 seconds. Of course it's not pure text, there are
images,
tables and math. I did this twice. The first time with drawing of text
fragments and
the 2nd time with single character drawing.
While doing this I collected the time profile with Shark, the profiler tool of
Xcode.
The most interesting observation I've made is: most of the time LyX is busy
with other
things - not with screen drawing. The scroll operation cost is 5% for the first
and 15%
for the second variant of drawing.
The other things are thread and socket management and QProcess's doing.
Stephan
OK, it is Enrico's job to ask for, but could rerun the test with USE_QPROCESS
undefined?
Peter
There is no difference in response time. Scroll speed is the same.
The numbers are changing a little bit, perhaps it's a little bit faster.
But it's far from a valuable performance gain.
I suspect, but hardly know, that in this case QProcess is simply being
used to launch things like graphics conversions, and it would be
shocking if using it instead of whatever we use instead was the issue
here. I suspect that the issue relates more to what we have to do every
time the screen moves, and I believe we do that---e.g., recalculate
metrics prior to redrawing the screen, which may involve a buffer
update, etc, etc---each time new material appears on the screen, which
could be every 0.1 seconds or so if you are scrolling quickly, or
holding down PageDn. A shot in the dark: Could one interrupt these
processes when a new scroll event happens? Why finish calculating the
metrics when we know they are about to be irrelevant?
Richard