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 792335 - Rate limit trash monitor updates
Rate limit trash monitor updates
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2018-01-08 16:45 UTC by Ondrej Holy
Modified: 2018-05-02 19:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
trash-monitor: Rate limit updates (2.96 KB, patch)
2018-01-08 16:47 UTC, Ondrej Holy
none Details | Review
trash-monitor: Rate limit updates (2.96 KB, patch)
2018-01-26 14:59 UTC, Ondrej Holy
none Details | Review

Description Ondrej Holy 2018-01-08 16:45:44 UTC
Trash monitor queries info from gvfsd-trash after each file monitor change which can be problematic when too many changes happen in a short time. Let's rate limit the number of queries...

I've already proposed a similar patch for Nautilus trash monitor:
https://gitlab.gnome.org/GNOME/nautilus/merge_requests/57

This is part of my effort to reduce CPU load during mass changes of mounts, see also:
https://bugzilla.gnome.org/show_bug.cgi?id=792331
Comment 1 Ondrej Holy 2018-01-08 16:47:13 UTC
Created attachment 366502 [details] [review]
trash-monitor: Rate limit updates
Comment 2 Matthias Clasen 2018-01-18 18:28:53 UTC
I am ok with rate-limiting, but 5 seconds is ... an eternity. Can lower this down to at most 1 second ?
Comment 3 Matthias Clasen 2018-01-23 15:40:39 UTC
Review of attachment 366502 [details] [review]:

can you shorten the limit ?
Comment 4 Ondrej Holy 2018-01-24 10:20:53 UTC
Sorry, I was sick. Thanks for the review. Sure, I can shorten the limit, although Nautilus has already merged it with 5 seconds without any objections. But if I am not mistaken, this is used only to set trash folder icon accordingly (empty/full). So I don't think that it is crucial problem when it will be delayed for 5 seconds in the worst case. But I have got a better idea in the meantime. It will be better to simply prevent g_file_query_info_async before we get a result for the previous call... so the trash daemon won't be overloaded and we will have the result as soon as possible. I will prepare a patch for it...
Comment 5 Ondrej Holy 2018-01-26 14:59:21 UTC
Created attachment 367481 [details] [review]
trash-monitor: Rate limit updates

Ok, I've finally only lowered the limit to 1 sec, because the suggestion from Comment 4 still allowing an unreasonable amount of queries...
Comment 6 GNOME Infrastructure Team 2018-05-02 19:41:41 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/gtk/issues/1010.