Performance hit?



Hey All,

I am working on an application that, simplified, looks a bit like this:

+--------------------+------------+
|                    |            |
| custom drawing     | scrolled   |
|  widget            | window     |
|                    |            |
+--------------------+------------+
|      X: foo  Y: bar             |
+---------------------------------+

The custom drawing widget and the scrolled window are together in a hpaned 
widget. The custom drawing widget has an even callback that updates the X and Y 
labels to show the coordinates of the mouse. Now, as I add widgets to the 
scrolled window (on the order of, say, 500 nested widgets), I experience a 
significant performance hit (on a SUN Ultra 1) in terms of update speed of the 
X and Y labels.

Why is this? You'd think that since the path through the widget hierarchy to my 
custom drawing widget does not depend on the subwindows of the scrolled window, 
there would not be a performance hit in this respect. Has anyone else seen 
similar behaviour? Even better, does anyone have an explanation, or even a fix?

Regards,

Johannes.
--
main(){char*h="W\"\34EnF\0T\"\24E*E\0v\"\24U.E\0T\"\24U,E\0W;\\}jv\0";while
(*h){while(*h){int k=7;while(--k>=0)putchar(*h&(1<<k)?'x':' ');++h;}
putchar('\n');++h;}exit(0);}

Gathering Magician in a Magic-less world?




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