GNOME Bugzilla – Bug 730856
smb enumerate doesn't send infos in batches
Last modified: 2014-05-28 19:38:56 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.
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.
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.
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...
Pushed to master as 5aa709f. Thanks for the review.