Closed jonesmz closed 3 years ago
→ https://github.com/lxqt/pcmanfm-qt/issues/462#issuecomment-458921464
And please avoid long-winded comments!
How was my comment long winded?
How was my comment long winded?
See https://github.com/lxqt/pcmanfm-qt/issues/462, which tells about the same thing.
Yes, I understand that the referenced bug is the original report for this problem, I just don't understand your request to not leave long winded comments. Could you elaborate on why you requested I not leave long winded comments?
Expected Behavior
When displaying a directory with a large number of files, which can be anywhere from a few dozen, to a few dozen thousand, pcmanfm-qt should start displaying files, even if the list is incomplete, within a second.
Current Behavior
When navigating to a folder that is hosted on another system, such as a mounted sshfs or smb share, pcmanfm-qt takes a noticeably long amount of time to display any contents of the folder, which is worse the larger the number of files in the folder.
One folder with 50 files in it takes 5 seconds to load. Another with 10,000 takes approximately 3 minutes.
Notably, however, navigating to a local folder with a similar number of files takes substantially less time. E.g. 50 files displays instantly, 10,000 displays in 5 seconds or so.
Possible Solution
It appears to be the case that pcmanfm-qt is conducting synchronous file listing operations where each operation needs to complete before any display is allowed.
Given that I can use "ls" on the commandline to get the full directory contents immediately, it appears that pcmanfm-qt is also probing the files for additional metadata of some sort, which accounts for the longer delay when dealing with remote systems.
One solution might be to display the list of files immediately, but then run the additional metadata queries asyncronously, and "fixup" what's displayed with the information as it becomes available.
And the other solution might be to batch file queries so that only the first dozen files or so need to be known before anything is displayed, and then as other files' information comes available, add them to the directory listing.
I thought that the problem might be found in folderview, foldermodelitem, folderitemdelegate, and so on, but a quick reading of those files doesn't turn up anything obvious to me (Not an expert on Qt)
Steps to Reproduce (for bugs)
For the case of a smb mount, the equivalent file display behavior on Windows 10 is nearly instant for the first few hundred files, and the rest of the files are loaded in asynchronously
Context
Normal file browsing is effected. For example, if I need to navigate to a folder that is a child of a folder with many files, i have to wait until the list of files in the parent folder is fetched before i can double click the folder that I really want.
System Information