Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: SMB servers load very slowly #12704

Open
life036 opened this issue Jun 23, 2023 · 5 comments
Open

Bug: SMB servers load very slowly #12704

life036 opened this issue Jun 23, 2023 · 5 comments
Labels
area - file system area - network drives Features or bug reports relating to network drives

Comments

@life036
Copy link

life036 commented Jun 23, 2023

Description

Just like the title says. In addition, I have a folder on my local HD that just has shortcuts to about a dozen SMB servers (standard shortcuts to locations like \ServerName), and it takes 30-40 seconds for that folder to load, vs instantly in Windows' File Explorer.

Something strange is going on with the way Files interacts with SMB servers.

Steps To Reproduce

  1. Connect to any SMB server on your LAN (\ServerName) and compare how quickly it loads to the native file explorer.

  2. Create a local folder on your HD with shortcuts to a handful of SMB servers on your network, and compare how quickly it loads to the native file explorer

Requirements

SMB locations, and folders full of shortcuts to SMB locations, should load just as fast (or nearly as fast) as the native File Explorer.

Files Version

2.5.1.0

Windows Version

10.0.22621.1848

Log File

debug.log

@life036 life036 added the bug label Jun 23, 2023
@Josh65-2201
Copy link
Member

Josh65-2201 commented Jun 24, 2023

Thanks for the report. Can you please provide the following information.

  • Is the issue with loading the contents of the network drive, or the folder containing the links to the network drives?
  • How many items does the folder contain?

@Josh65-2201 Josh65-2201 added the needs - additional info Needs more information from the reporter label Jun 24, 2023
@life036
Copy link
Author

life036 commented Jun 24, 2023

Thanks for the report. Can you give the following information.

  • Is the issue with loading the contents of a network drive or the folder containing the links to the network drives

Both situations have similar issues

  • How many items does the folder contain

My particular folder has 12 items, but the issue happens no matter how many shortcuts you have in there. The problem is just more pronounced when you have more items in the folder. It also seems to stutter longer on shortcuts whose endpoints aren't available; like Files checking the validity of the shortcut before loading it.

@Josh65-2201 Josh65-2201 removed the needs - additional info Needs more information from the reporter label Jun 24, 2023
@Josh65-2201
Copy link
Member

Thanks for the information, I've added this to the project board.

@yaira2 yaira2 changed the title SMB servers load 10x slower than in Windows' File Explorer Bug: SMB servers load 10x slower than in Windows' File Explorer Jun 28, 2023
@Josh65-2201 Josh65-2201 added the area - network drives Features or bug reports relating to network drives label Jun 19, 2024
@yaira2 yaira2 removed the bug label Oct 7, 2024
@yaira2 yaira2 moved this from 🆕 New to 📋 Planning stage in Files task board Dec 22, 2024
@yaira2 yaira2 changed the title Bug: SMB servers load 10x slower than in Windows' File Explorer Bug: SMB servers load very slowly Dec 23, 2024
@KFlab
Copy link

KFlab commented Feb 14, 2025

Since I am a non-native English speaker, I am sorry for my poor English。
I have same problem and I think I found some useful information。

I found a lot of download traffic coming from my SMB server,
so I use wireshark to capture analysis.

Here's the information I got:

step 1)
there's a package try to read one of my file's info,
The target file is a mod pack for a game, and it's a 47.53GB size and zip type.
I will call this file "a.zip"

step 2)
SMB server send a TCP package back
and a shows success

step 3)
There 's a to "a.zip" with Length 65536 Offset 65536

step 4)
There 's a to "a.zip" again with Length 69632 Offset 51039236096
The file here seems Central Directory Record part of a zip file

step 5) <<< i think here have some problem
Another to "a.zip" with Length 131072 Offset 131072

and more with Length 131072 or 262144

Image

But prublem here is , the directory I'm opening is a directory of my Aria downloads.
So it has a lot of huge zipped files in it.

I haven't started reading more of the program's source code, and I'll try to spend a little bit of time locating the source of this traffic

@KFlab
Copy link

KFlab commented Feb 14, 2025

I have figured out what happened. When a directory starts with "\", it is recognized as a shared directory. This type of directory has some special optimizations, so when browsing directories in this format, there will be no lag.

But when this directory is mapped as a network drive such as "Y:"

The part of the program that handles compressed files will try to get the entire file
This causes IO blocking,and it crashes the program

Another problem comes from aria2
aria2 will create a temporary download file, such as "a.zip.aria2“
The part responsible for processing the compressed package will treat it as part of "a.zip"
This exacerbates the lag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area - file system area - network drives Features or bug reports relating to network drives
Projects
Status: 📋 Planning stage
Development

No branches or pull requests

5 participants