Re: [gtkmm] TreeView performance

i use the 'standard' list store (which i would think would incur the least cpu overhead). would multi-threading help? it seems to me like whether it was one thread in a process or several, they would collectively be making the same demands on the cpu? slightly more in the multi-threaded case beacause of the context switches?


Markus Gerwinski wrote:
Tim Flechtner wrote:

this leads me to believe that the TreeView widget just wasn't intended to be used for this sort of purpose. i'm just writing in the hopes that maybe there's something easy i could do which would lose me about 55% of the cpu usage. :) this is not a criticism of the widget at all, i think its really flexible, and once the learning curve has been climbed, convienent to use (which is why i want to do so :) ). any comments are greatly appreciated.

The first thing I'd try to change is the model itself... do you use the
standard TreeStore, or did you derive an own class from TreeModel?

Second, did you already try to put the update of the model into an own
thread? As you describe it, the TreeView seems to be notified a few
hundred times per second of an update. Maybe you can write a thread
that polls for new data every second or so, and updates the TreeView
only after every poll.

Hope this helps,


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