Re: [gtkmm] TreeView performance

>   i am writing a trading application that displays updates to financial 
>contracts in real time, using a TreeView widget.  there can be four to 
>five hundred updates coming in a second, and under this load my 
>application takes about 60% of the cpu time of my dual processor 2.53 
>mhz box.  through experimentation, i noticed that when i commented out 
>the code which updates text in its various columns (but all the other 
>processing, and rendering of colors still occurs), my cpu usage falls to 
>  2%.

to reinforce what others have said: you don't do anything in the GUI
part of the code 4-500 times a second. the maximum screen refresh rate
is never above 100Hz, and there is little point attempting to update
what's drawn on the screen faster than it can be physically
displayed. i generally use 10 updates per second for most of my
real-time display stuff, and it works just fine.

you need to separate our your monitoring of the updates from changing
the screen display. its standard stuff for many kinds of programs.


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