Re: Help CPU usage at 8.9% ?
- From: Rasoul Hajikhani <rhajikhani exchange office etoys com>
- To: Paul Barton-Davis <pbd Op Net>
- Cc: gtk-list gnome org
- Subject: Re: Help CPU usage at 8.9% ?
- Date: Thu, 16 Nov 2000 13:23:19 -0800 (PST)
--p,
how is it done, one gtk_timeout_add() for all _TWTY of them? Sorry man but
I am new to the whole concept of gtk...
-r
On Wed, 15 Nov 2000, Paul Barton-Davis wrote:
> In message <Pine LNX 4 10 10011151819450 2040-100000 localhost localdomain>you
> write:
> >I have this piece of code that when run, has a 9.0% cpu usage
>
> Ah, did you mention you were using GtkLevelHold the last time ? :))
>
> Yes, if you have twenty of these suckers updating every 10msecs,
> you'll be burning a notable fraction of your CPU. The way they use
> GtkRgb (and GdkRgb below it) is not supremely efficient.
>
> For my project ardour (http://ardour.sourceforge.net), I typically
> have 26 on screen, and its been a growing concern of mine. It would be
> possible to do 90% of the functionality with gdk_copy_area() and 1 or
> 2 pixmaps, but the level *hold* bar is a little tricker to get right.
>
> So basically, yep, this is exactly what you'd expect.
>
> However, I would point out that your implementation could be
> improved. You only need a single gtk_timeout_add() - that function can
> itself loop through all _TWTY LevelHolds and update them. This will
> reduce the strain on the main loop scheduling in glib. Right now, you
> have one timeout per bar, which is the wrong way around, IMHO
>
> --p (seasoned LevelHold user and hacker)
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]