Improve loading performance of large folders and network mounts - #3825
Open
paulvandenburg wants to merge 3 commits into
Open
Improve loading performance of large folders and network mounts#3825paulvandenburg wants to merge 3 commits into
paulvandenburg wants to merge 3 commits into
Conversation
…rantly. free_location_change() null-checks slot->new_content_view, then calls nemo_view_stop_loading() on it. That removes the view's directory monitor, which runs the directory's async state machine and can emit signals that come back round to free_location_change() for the same slot. The reentrant call clears and unrefs slot->new_content_view, so when the outer call resumes it hands NULL to nemo_window_disconnect_content_view(), which asserts on it and aborts.
Author
|
Latest commit also fixes a crash I encountered, under certain conditions I'm not fully sure of with back/forth navigation and view refreshing. Not sure if it was introduced here, but this hopefully fixes it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context:
I noticed that opening folders with lots of files, especially from a network mount (SMB), was very slow and while loading the files shown would jump around as newly loaded files were inserted between the previously shown files. Opening the same folder mounted in Windows was fast, so I wanted to fix this.
For context I used these folders for my tests:
SMB notes, I use mostly default settings for the mounted folder. Of note is that rsize was at 4MB (default).
The relevant network setup is that the server is at home (wired connection), that I'm trying to access from my laptop over WIFI (stable/strong signal). So near optimal conditions.
Nemo settings are mostly default. Thumbnail generation is set to
Yesso those are also generated for network mounts.Steps taken:
lsin the CLI. Wheretime ls /mnt/lots-o-filesshows a real time of0,3sbut atime ls -l /mnt/lots-o-filesgives11,8s. Explained by the second needing to get file stats for each, needing a network round trip per file, getting slow even on a fast connection with large file numbers.To avoid the
rsizevalue causing a 4MB load regardless,posix_fadviseis used to only get the necessary bytes.Results:
Considerations:
Notes:
.editorconfigin the project, added one that I think reflects those standards, which I included in a separate commit. Can be removed. Did notice the existing code contained quite a few whitespace at the end of lines, tried to not include the cleanup of those here.