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 784216 - GNOME Logs are slow
GNOME Logs are slow
Status: RESOLVED FIXED
Product: gnome-logs
Classification: Other
Component: general
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-logs maintainer(s)
gnome-logs maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-06-26 13:53 UTC by David Novák
Modified: 2017-10-27 12:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove GtkSizeGroup to improve performance of scolling (4.05 KB, patch)
2017-07-07 02:46 UTC, Jonathan Kang
committed Details | Review

Description David Novák 2017-06-26 13:53:05 UTC
I quite like how this application works, but it becomes painfully slow when going deeper down the log.

Do you know about this or is this only mine problem? If so, can I get some debug information, that would help you improve the performance?

Thanks.
Comment 1 Pranav Ganorkar 2017-06-28 15:11:49 UTC
To solve this, maybe GNOME Logs could implement some multi-threading mechanism to prefetch the upcoming journal entries in the model or cache them to be shown in the events list later on. Due to this, scrolling can be made smooth when going deeper down the logs.
Comment 2 David Novák 2017-06-28 17:24:44 UTC
Well I don't really understand why is it slow in the first place... I mean.. The logs are basically files and when we go deeper, we simply traverse through file and parse it into items..

But when I scroll whole one thread is running on 100% (I run on Core i3 540@3GHz) - it's probably doing some unnecessary work and would be worth a look through profiler.. Maybe calls to GTK during creating items are killing the performance?
Comment 3 Pranav Ganorkar 2017-06-28 17:45:06 UTC
(In reply to David Novák from comment #2)
> Well I don't really understand why is it slow in the first place... I mean..
> The logs are basically files and when we go deeper, we simply traverse
> through file and parse it into items..
> 
> But when I scroll whole one thread is running on 100% (I run on Core i3
> 540@3GHz) - it's probably doing some unnecessary work and would be worth a
> look through profiler.. Maybe calls to GTK during creating items are killing
> the performance?

Yes, might be a possibility. Would need to examine GNOME Logs through a profiler such as sysprof.
Comment 4 Jonathan Kang 2017-07-03 09:21:30 UTC
@David

Thanks for the report. You're not alone with this problem. And it should be
fixed to improve the performance.

This might be due to the low priority of the function that fetches more log
entries. Currently the priority of the idle source is G_PRIORITY_LOW. I played
with the priority a bit and found that changing it to a higher value
(for example G_PRIORITY_HIGH_IDLE) does make it a lot faster to scroll down the
list.

But even with the priority set to a relatively higher value, there is a
delay(1 second-ish) for updating those widgets after some log entries are
fetched.

I'll spend more time on investigate this issue and see what the real problem is.
Comment 5 Jonathan Kang 2017-07-07 02:46:41 UTC
Created attachment 355058 [details] [review]
Remove GtkSizeGroup to improve performance of scolling

This performance issue is caused by GtkSizeGroup. Adding too many(hundreds and
maybe thousands of) widgets to a GtkSizeGroup does influence the performance
quite a lot.
Comment 6 Jonathan Kang 2017-07-10 02:13:52 UTC
Comment on attachment 355058 [details] [review]
Remove GtkSizeGroup to improve performance of scolling

Pushed to master as commit 808466cfb6d8358e1d4766b9497634e58aa98718.
Comment 7 David Novák 2017-07-10 13:46:13 UTC
(In reply to Jonathan Kang from comment #6)
> Comment on attachment 355058 [details] [review] [review]
> Remove GtkSizeGroup to improve performance of scolling
> 
> Pushed to master as commit 808466cfb6d8358e1d4766b9497634e58aa98718.

Awesome to see this quick reaction and also a solution! Much appreciated :)

Just a side question: Will this arrive as a "bugfix" to GNOME 3.22/3.24 or will we have to wait for 3.26 to use it?
Comment 8 Jonathan Kang 2017-07-17 02:43:15 UTC
(In reply to David Novák from comment #7)
> (In reply to Jonathan Kang from comment #6)
> > Comment on attachment 355058 [details] [review] [review] [review]
> > Remove GtkSizeGroup to improve performance of scolling
> > 
> > Pushed to master as commit 808466cfb6d8358e1d4766b9497634e58aa98718.
> 
> Awesome to see this quick reaction and also a solution! Much appreciated :)
> 
> Just a side question: Will this arrive as a "bugfix" to GNOME 3.22/3.24 or
> will we have to wait for 3.26 to use it?

Emm. I'm afraid not. We usually don't fix bugs in former branches for the sake of
stability.
Comment 9 David Novák 2017-07-17 12:38:54 UTC
Really? I thought that that only applied to new features (which is obvious)..

Bugfixes doesn't usually change behavior or API, so it should be pretty straightforward to backport them. But I understand why you don't do it with fixes like this one. But do you do it with security bugfixes (I hope so)?
Comment 10 Pranav Ganorkar 2017-07-18 19:59:35 UTC
(In reply to Jonathan Kang from comment #5)
> Created attachment 355058 [details] [review] [review]
> Remove GtkSizeGroup to improve performance of scolling
> 
> This performance issue is caused by GtkSizeGroup. Adding too many(hundreds
> and
> maybe thousands of) widgets to a GtkSizeGroup does influence the performance
> quite a lot.

Performance has improved a lot now and it does not lag while scrolling in the events list. Thanks for working on this !
Comment 11 Jonathan Kang 2017-08-01 11:11:13 UTC
Fix is also pushed to gnome-24 branch, and I made a new 3.24.2 release. As 3.22
is relatively old, we won't backport the patch to gnome-3.22 branch.