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 757807 - The startup time for Logs is very long
The startup time for Logs is very long
Status: RESOLVED FIXED
Product: gnome-logs
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-logs maintainer(s)
gnome-logs maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-11-09 11:04 UTC by Jonathan Kang
Modified: 2015-11-12 12:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for this bug (5.31 KB, patch)
2015-11-09 11:30 UTC, Jonathan Kang
needs-work Details | Review
patch updated (8.41 KB, patch)
2015-11-12 12:02 UTC, Jonathan Kang
committed Details | Review

Description Jonathan Kang 2015-11-09 11:04:17 UTC
I have more than 700 boots in my system. And it takes me more than 4 minutes to open Logs, which is annoying.
Previously we fetch all the boots in the system, but only the latest 5 boots should be useful. So improving the startup time by only fetching the latest 5 boots should be fine.
Comment 1 Jonathan Kang 2015-11-09 11:30:58 UTC
Created attachment 315116 [details] [review]
patch for this bug
Comment 2 David King 2015-11-11 11:46:31 UTC
Review of attachment 315116 [details] [review]:

Does this work when there are fewer than 5 boots?

::: src/gl-journal.c
@@ +137,3 @@
         }
 
+        r = sd_journal_get_monotonic_usec (priv->journal, NULL, &id);

It is confusing to use sd_journal_get_monotonic_usec() to get (just) the boot ID. Needs at least a comment, but I think it is better to use the existing approach (sd_journal_get_data(), although that is hidden inside the FOREACH macros).
Comment 3 Jonathan Kang 2015-11-12 12:02:00 UTC
Created attachment 315331 [details] [review]
patch updated
Comment 4 David King 2015-11-12 12:14:07 UTC
Review of attachment 315331 [details] [review]:

Seems fine to me.
Comment 5 Jonathan Kang 2015-11-12 12:24:42 UTC
Pushed to master as commit 21e890edc58c16cdef3fc4a9b92f555d8c99cf94