GNOME Bugzilla – Bug 719807
GVfsJobProgress should rate-limit progress updates
Last modified: 2014-01-23 10:12:09 UTC
GVfsJobProgress should rate-limit progress updates to prevent flooding the dbus daemon with messages.
This would be useful for the sftp backend with the recently added push and pull support.
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).
Created attachment 263453 [details] [review] ftp: Remove custom progress callback rate limiting
Created attachment 263551 [details] [review] ftp: Remove custom progress callback rate limiting
The updated patch removes two now-unused functions.
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.
Review of attachment 263551 [details] [review]: Looks good, thanks.
Pushed to master as 44b66a90..cf884c04. Thanks for the review!