bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug awt/26486] Graphics.fillRect extremely slow


From: fitzsim at redhat dot com
Subject: [Bug awt/26486] Graphics.fillRect extremely slow
Date: 7 Mar 2006 01:32:49 -0000


------- Comment #10 from fitzsim at redhat dot com  2006-03-07 01:32 -------
For oneslime we currently call gdk_flush once every 500us which is obviously
way overkill.  I'm working on a patch that will batch graphics operations,
restricting the gdk_flush call rate to a maximum of once every 20ms (about 50
frames-per-second).  Unfortunately, I believe these gdk_flush calls are
unavoidable for AWT applications since they may paint from threads other than
the GTK main loop thread.  See FAQ entry 5.3:

http://www.gtk.org/faq/

My patch will also use XFlush directly as suggested in the FAQ.

Limiting the rate of gdk_flush calls may solve the Swing slowness that your
test case demonstrates.  If it turns out that disabling gdk_flush calls
altogether results in better results for your benchmark, I'll disable them for
Swing components only -- though this may affect the smoothness of animations
painted on Swing components.

I'll post my patch for you to try, tomorrow.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26486





reply via email to

[Prev in Thread] Current Thread [Next in Thread]