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 719807 - GVfsJobProgress should rate-limit progress updates
GVfsJobProgress should rate-limit progress updates
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: daemon
git master
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2013-12-03 21:33 UTC by Ross Lagerwall
Modified: 2014-01-23 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
daemon: Rate limit progress callbacks (2.52 KB, patch)
2013-12-03 22:09 UTC, Ross Lagerwall
committed Details | Review
ftp: Remove custom progress callback rate limiting (4.04 KB, patch)
2013-12-03 22:09 UTC, Ross Lagerwall
none Details | Review
ftp: Remove custom progress callback rate limiting (4.45 KB, patch)
2013-12-04 22:54 UTC, Ross Lagerwall
committed Details | Review

Description Ross Lagerwall 2013-12-03 21:33:54 UTC
GVfsJobProgress should rate-limit progress updates to prevent flooding the dbus daemon with messages.
Comment 1 Ross Lagerwall 2013-12-03 22:09:02 UTC
This would be useful for the sftp backend with the recently added push and pull support.
Comment 2 Ross Lagerwall 2013-12-03 22:09:35 UTC
Created attachment 263452 [details] [review]
daemon: Rate limit progress callbacks

To prevent flooding the dbus daemon with messages, rate limit the
progress callbacks to 10 per second (i.e. every 100 milliseconds).
Comment 3 Ross Lagerwall 2013-12-03 22:09:38 UTC
Created attachment 263453 [details] [review]
ftp: Remove custom progress callback rate limiting
Comment 4 Ross Lagerwall 2013-12-04 22:54:09 UTC
Created attachment 263551 [details] [review]
ftp: Remove custom progress callback rate limiting
Comment 5 Ross Lagerwall 2013-12-04 22:54:53 UTC
The updated patch removes two now-unused functions.
Comment 6 Ondrej Holy 2014-01-17 13:04:52 UTC
Review of attachment 263452 [details] [review]:

Looks good, just a note...

::: daemon/gvfsjobprogress.c
@@ +78,3 @@
+  gint64 current_time = g_get_monotonic_time ();
+
+  if (current_time - job->priv->last_time < 100000 &&

Would be nice to define new macro with this rate time at the top of the file.
Comment 7 Ondrej Holy 2014-01-17 13:11:05 UTC
Review of attachment 263551 [details] [review]:

Looks good, thanks.
Comment 8 Ross Lagerwall 2014-01-23 10:11:32 UTC
Pushed to master as 44b66a90..cf884c04. Thanks for the review!