On 20 March 2018 at 14:06, Kian Karas <kian.karas....@gmail.com> 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 otherwise idle at 0-2,6 %). > The CPU is a single core ARM Cortex-A7 running at 528 MHz (maximum). > > This seems like a lot of MIPS for rotating an image of approximately 20x20 > px. > > The rotation is performed through CSS, in order to be stylable by themes; this means that the CSS state has to be invalidated in order to recompute the next frame, and this is there the cost lies. Of course, 45% is a pretty big chunk of a core, so it's indeed problematic on single core, low performance devices. It's going to be the case for every animation involving CSS, though, so you may elect to either disable animations on your platform, or use a static placeholder image. There's also the option of using a theme that does not have as many states for the spinner animation, thus causing fewer invalidations. We are actively working to fix the issue on GTK 4, but changing the CSS subsystem has the potential of breaking GTK 3 applications, so it's not on the roadmap, outside of low impact optimizations. Ciao, Emmanuele. -- https://www.bassi.io [@] ebassi [@gmail.com] _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list