Re: _POOR_ repaint performace??



(List changed to gtk-list, which is the correct place to discuss this on.)

On Wed, 24 Jun 1998, Chris Evans wrote:

> Pretty much all of GNOME suffers from poor repaint performance. It is
> probably a generic GTK problem. The worse case is probably opaque
> dragging a window over, say, a GIMP picture or column list widget. The
> root of the problem is then plain to see; lots of _very_ small repaint
> events are being performed.
> 
> Performace would sky-rocket if when doing a repaint (ie. handling an
> expose event) we check the queue for other expose events and performed
> intelligent rectangle coalescing. This needs doing.
> 
> My question: is anyone working on this? If not give me some pointers and
> I'll look into it. My main question is if this could be handled cleanly
> at the gtk or gdk layer without hideously breaking abstraction layers.

It should be pretty easy, actually. 

Near the top of gdk_event_translate():
	if the event queue has more than one expose event:
		event_region = gdk_region_new();
		for curevent in (expose events in queue):
			ev2 = gdk_region_union_with_rect(event_region, &curevent->expose.area);
			gdk_region_destroy(event_region);
			event_region = ev2;
			remove curevent from event queue
		gdk_region_get_clipbox(event_region, &event->expose.area);
Or something like that.

Perhaps a cleaner place to do it (i.e. not in the already-overcrowded
gdk_event_translate function) would be to put the functionality in a
separate event filter (gdk_window_add_filter()) that gets added in
gdk_init().

> PS Could this list be modified to allow "chris@" to post if I'm
> subscribed under "chris-gnome@"? Or perhaps a posters list could be
> started?

mail -s subscribe post-only-request@redhat.com < /dev/null

-- Elliot
When I die, I want to die peacefully in my sleep like my grandfather...
	...not yelling and screaming like the people in the back of the
	   plane he was flying.



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