After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771755 - extremely slow on raspberry pi2
extremely slow on raspberry pi2
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: Broadway
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-09-21 08:52 UTC by elfmz
Modified: 2018-04-15 00:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch file (27.91 KB, text/plain)
2016-09-21 08:52 UTC, elfmz
  Details
broadway: optimizations, minor security fix, options to reduce CPU usage by cost of increasing network traffic (26.55 KB, patch)
2016-12-17 11:05 UTC, elfmz
none Details | Review

Description elfmz 2016-09-21 08:52:45 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
Comment 1 elfmz 2016-12-17 11:05:14 UTC
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

.
Comment 2 Matthias Clasen 2018-02-10 04:56:38 UTC
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.
Comment 3 Matthias Clasen 2018-04-15 00:01:50 UTC
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