Re: A simple GtkSpinner is very costly in CPU cycles

2018-03-22 Thread Eric Cashon via gtk-app-devel-list
Hi Kian For effeciency, use one of the default cursors. https://developer.gnome.org/gdk3/stable/gdk3-Cursors.html If you want, you can try creating your own cursor with animation and using that. I got this working on my netbook which isn't a very high powered computer by todays

Re: A simple GtkSpinner is very costly in CPU cycles

2018-03-22 Thread Kian Karas
On Wed, Mar 21, 2018 at 10:17 AM, Emmanuele Bassi wrote: > On 20 March 2018 at 14:06, Kian Karas wrote: > >> Hi smart people >> >> I just introduced animation, in the form of a GtkSpinner, to my >> application >> for the first time. When the spinner

Re: A simple GtkSpinner is very costly in CPU cycles

2018-03-21 Thread Emmanuele Bassi
On 20 March 2018 at 14:06, Kian Karas wrote: > Hi smart people > > I just introduced animation, in the form of a GtkSpinner, to my application > for the first time. When the spinner is animating, the application takes up > 45 % of the CPU resources (the application is

Re: A simple GtkSpinner is very costly in CPU cycles

2018-03-21 Thread Lucky B.C
Well the Gtk main loop can not break out, it means you can not play animation of the GtkSpinner as slow as you want. I'm sorry I had not used the GtkSpinner before, then I just did a test on the widget, so I see we only make it playing or stop animation by setting it's "active" property TRUE or

Re: A simple GtkSpinner is very costly in CPU cycles

2018-03-21 Thread Kian Karas
Hi Lucky I don't understand what it is you suggest. Could you elaborate? Regards On Tue, Mar 20, 2018 at 3:35 PM, Lucky B.C wrote: > Hi, > I am not sure about playing animation of the spinner to cause the high > cost. But you can try to have a callback from the

Re: A simple GtkSpinner is very costly in CPU cycles

2018-03-20 Thread Lucky B.C
Hi, I am not sure about playing animation of the spinner to cause the high cost. But you can try to have a callback from the g_timeout_add function for starting (gtk_spinner_start) and stopping (gtk_spinner_stop) the animation. On Tue, Mar 20, 2018, 21:07 Kian Karas

A simple GtkSpinner is very costly in CPU cycles

2018-03-20 Thread Kian Karas
Hi smart people I just introduced animation, in the form of a GtkSpinner, to my application for the first time. When the spinner is animating, the application takes up 45 % of the CPU resources (the application is otherwise idle at 0-2,6 %). The CPU is a single core ARM Cortex-A7 running at 528