Bug 26153 - StyledText: Performance refresh flash of text
Summary: StyledText: Performance refresh flash of text
Status: RESOLVED DUPLICATE of bug 53791
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.1   Edit
Hardware: PC Linux
: P3 critical with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 18955 44691 46627 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-11-13 14:10 EST by Andrew Irvine CLA
Modified: 2005-12-16 11:25 EST (History)
10 users (show)

See Also:


Attachments
Patch providing redraw request queue in Control (2.85 KB, patch)
2004-01-26 14:28 EST, Douglas Pollock CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Irvine CLA 2002-11-13 14:10:41 EST
Eclipse 20021113
Platforms: linux gtk & motif

Open any class, WelcomeEditorCopyAction, only 31 lines, yet larger than my 
editor area.  Now comment out the public method run().  Notice the quick flash 
to the top of the file.  Repeat the same test with a larger class, 
WelomeEditor (860 lines).  Comment out the last method, same flash.
Comment 1 Christophe Cornu CLA 2002-11-14 10:02:00 EST
Grant to investigate and advise

(Grant: since you've been keeping an eye on performance issue on Motif and 
Linux in general, can you comment on this?)
Comment 2 Grant Gayed CLA 2002-11-19 15:48:10 EST
The problem is that Control.setRedraw(boolean) is not implemented, because X 
does not support this.  Therefore redrawing of the editor is not successfully 
turned off.  Perhaps we can fake it somehow.
Comment 3 Dani Megert CLA 2003-10-20 03:29:38 EDT
*** Bug 44691 has been marked as a duplicate of this bug. ***
Comment 4 Erik Reuter CLA 2003-11-06 14:11:22 EST
This bug was not visible for me until the 3.0M4 release, see my duplicate Bug
44691. 3.0M3 worked brilliantly.

This is a major showstopper for me on Linux to work with the 3.0Mx builds. You
should post an epilepsia warning on the Linux builds until this is fixed!!

Please give this bug some attention!
Comment 5 Dani Megert CLA 2003-11-13 18:22:38 EST
*** Bug 46627 has been marked as a duplicate of this bug. ***
Comment 6 Dani Megert CLA 2003-11-21 03:06:19 EST
*** Bug 18955 has been marked as a duplicate of this bug. ***
Comment 7 Douglas Pollock CLA 2004-01-26 14:28:38 EST
Created attachment 7571 [details]
Patch providing redraw request queue in Control

I'm not sure if this is what people are looking for, but it provides a
noticeable effect on my machine.  A particular test case is to open a menu, and
then move the mouse left and right quickly.  Before the patch, you should be
able to see redraw flickers as the menu disappears and reappears.  After the
patch, the flickering is gone.

What this does is create a queue of redraw requests in Control when
redraw=false.  This means that all redrawWidget() invocations just add to the
queue.	Eventually, when redraw is set back to true, the redraw requests are
replayed in order.

A further optimization would be to merge the pending redraws into one dirty
region before posting the redraw request to X/GTK.  This would probably give a
performance benefit, but it depends how X-intensive GdkRectangle queries are.

Again, I'm not sure if this is what people are looking for, but I hope it
helps.
Comment 8 Tom Hofmann CLA 2004-03-08 10:01:37 EST
Following up bug 52899, Steve has fixed StyledText to not flash any longer upon
calling setText. 

This works fine so far (N20040308): the editor area (canvas) does not flash any
more at all - the (native) scrollbar thumb still jumps to the top and back
quickly, though barely noticeable on a fast machine.
Comment 9 Billy Biggs CLA 2004-03-22 16:19:04 EST
Tom,

The scrollbar behaviour may have something to do with this issue we were looking at:
http://bugzilla.gnome.org/show_bug.cgi?id=137713

I don't think it's right that the function does that, but I'm also unconvinced
that SWT needs to call gtk_adjustment_value_changed() so much.
Comment 10 Tom Hofmann CLA 2004-03-30 06:18:47 EST
With M8, the flash fixed by bug 52899 is back!
Comment 11 Veronika Irvine CLA 2004-05-25 17:12:20 EDT

*** This bug has been marked as a duplicate of 53791 ***
Comment 12 Dani Megert CLA 2005-12-16 11:25:26 EST
*** Bug 121140 has been marked as a duplicate of this bug. ***