GNOME Bugzilla – Bug 771755
extremely slow on raspberry pi2
Last modified: 2018-04-15 00:01:50 UTC
Created attachment 335980 [details] patch file I tried to run GUI application on ARM-based (RPI2) NAS box and found that broadway is extremely slow there and consumes a lot of CPU. However I was able to improve performance in such hardware by 4..5 times (measured broadway_output_put_buffer() time reduced from 230msec to 60msec). Here're changes description: 1) Added possibility (via command line) to change zlib compression level or to disable zlib at all (including protocol level change - put uncompressed buffer opcode 'B') 2) Added possibility (via command line) to disable blocks-level comparing. This gave MOST of performance benefit on RPI2. 3) BroadwayOutput now encodes into GOutputStream instead of gstring. This made possible to write encode/compress directly to output stream without intermediate gstring-s (less memcpy-s) 4) broadway_output_send_cmd() now issues single send. This improved performance and fixed minor security issue mentioned in FIXME: comments .patch file attached. You also can look at them on github PR from wich that patch was created: https://github.com/GNOME/gtk/pull/6
Created attachment 342115 [details] [review] broadway: optimizations, minor security fix, options to reduce CPU usage by cost of increasing network traffic I tried to run GUI application on ARM-based (RPI2) NAS box and found that broadway is extremely slow there and consumes a lot of CPU. However I was able to improve performance in such hardware by ~4 times (measured broadway_output_put_buffer() time reduced from 230msec to 60msec): 1) Added possibility (via command line arg --compression) to change zlib compression level or to disable zlib at all (including protocol level change - put uncompressed buffer opcode 'B') if specified compression level 0. 2) Added possibility (via command line arg --no-blocks ) to disable blocks-level comparing. This gave most of performance benefit on RPI2. 3) BroadwayOutput now encodes into GOutputStream instead of gstring. This made possible to write encode/compress directly to output stream without intermediate gstring-s (less memcpy-s) 4) broadway_output_send_cmd() now issues single send. This improved performance and fixed minor security issue mentioned in FIXME: comment https://bugzilla.gnome.org/show_bug.cgi?id=771755 .
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla. If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab: https://gitlab.gnome.org/GNOME/gtk/issues/new