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 730856 - smb enumerate doesn't send infos in batches
smb enumerate doesn't send infos in batches
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: smb backend
1.21.x
Other Linux
: Normal minor
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2014-05-27 22:17 UTC by Ross Lagerwall
Modified: 2014-05-28 19:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
smb: Improve batching when sending enumerate GFileInfos (2.26 KB, patch)
2014-05-27 22:29 UTC, Ross Lagerwall
committed Details | Review

Description Ross Lagerwall 2014-05-27 22:17:29 UTC
The smb backend calls g_vfs_job_enumerate_add_infos after reading the entire directory with an entire list of infos rather than using g_vfs_job_enumerate_add_info to send them in batches of 50.
Comment 1 Ross Lagerwall 2014-05-27 22:29:16 UTC
Created attachment 277348 [details] [review]
smb: Improve batching when sending enumerate GFileInfos

Instead of creating a list of GFileInfos and sending them when the
entire directory has been read, call g_vfs_job_enumerate_add_info
to send them in batches (default of 50).  This simplifies the code
and should reduce the memory usage when enumerating a large directory.
Comment 2 Bastien Nocera 2014-05-28 09:58:01 UTC
Review of attachment 277348 [details] [review]:

It works well, as we have the results of the directory listing quicker, but nautilus seems to show them all up at once (testing this with a directory with 1k files on my local network) instead of showing them in bunches. Might need to tweak nautilus' timeouts for such operations.
Comment 3 Ross Lagerwall 2014-05-28 12:24:48 UTC
From what I've seen, Nautilus waits until it has enumerated the entire directory.

https://bugzilla.gnome.org/show_bug.cgi?id=682836#c7 could be related...
Comment 4 Ross Lagerwall 2014-05-28 19:38:40 UTC
Pushed to master as 5aa709f.  Thanks for the review.