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 787196 - Delay when drawing graphs
Delay when drawing graphs
Status: RESOLVED OBSOLETE
Product: system-monitor
Classification: Core
Component: resources
3.24.x
Other Linux
: Normal normal
: ---
Assigned To: System-monitor maintainers
System-monitor maintainers
: 787197 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-09-02 21:03 UTC by FelixO
Modified: 2018-05-22 12:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description FelixO 2017-09-02 21:03:55 UTC
When you launch System Monitor the Resources tab graphs do not start being drawn for 8-9 seconds.

Ubuntu Gnome 17.04, System Monitor 3.24.0

See also this bug report for the same problem in Gnome 3.14.1: https://bugzilla.redhat.com/show_bug.cgi?id=1166838
Comment 1 Benoît Dejean 2017-09-03 17:44:33 UTC
*** Bug 787197 has been marked as a duplicate of this bug. ***
Comment 2 David Bertram 2017-11-01 15:03:41 UTC
I was able to fix the graph being drawn "too far to the right", but it showed up that the graph only gets drawn "in timed steps" while it is constantly moving to the left.

- just moving the graph drawing starting point to the correct position did not really look nice at all (graph moves to the left, looks incomplete, updates the "missing part", graph moves to the left again, looks incomplete)
- just moving a little bit too far to the right, so the graph always looks complete and appears only a little bit delayed did not feel like a really clean solution

I think the issue exists since several years now and I'd be willing to help fix it.

Any thoughts or questions?
Comment 3 Robert Roth 2017-11-01 15:29:25 UTC
@David Bertram: patches are welcome, I have tried it a couple of times, but didn't manage to fix it, if you have any proposed solution, patch, just post it and I will review and merge it as soon as it is ready. Or if anyone has any suggestion on how we could fix this, I will try to transpose that into a patch, I am out of ideas.
Comment 4 Benoît Dejean 2017-11-01 15:59:00 UTC
Your analysis show that it's a drawing problem, not about the data collection ?
Comment 5 David Bertram 2017-11-02 10:36:29 UTC
I'd say so, yes. 
The problem of delayed graphs is mostly caused by the graph drawing starting point being set too far right, not by any data collection issues.

Although the problem of "updating the graph itself only in timed steps" might be related to how the data points are gathered.. 


you can check the calculations for "x_offset" in "line 236" of "load-graph.cpp"

just adding " - 50;" moves the graph a little bit to the left, almost "good".
..you can play with different values to analyze the behavior

I am trying to find a dynamic solution that will work with different screensizes, fontsizes, high/low resolution, ... but did not yet have enough time to work on that, and not even sure that it would not be safe to "hardcode" that value" here..
Comment 7 GNOME Infrastructure Team 2018-05-22 12:19:29 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-system-monitor/issues/72.