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

File Explorer very slow when there are a lot of media files. #20

Open
FirehawkV21 opened this issue Jul 31, 2020 · 19 comments
Open

File Explorer very slow when there are a lot of media files. #20

FirehawkV21 opened this issue Jul 31, 2020 · 19 comments

Comments

@FirehawkV21
Copy link

Environment

Item Value
OS, Version / Build Windows 10, Version 10.0.14092.0 (Insider Build)
Processor Architecture x64
Processor Type & Model Intel Core i3-6006U
Memory 16GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) C: SSD 37.4GB/111GB
Relevant apps installed VS Code, Visual Studio

Description

When I'm working on a folder with a lot of media files (say, music for a game I'm developing), the File Explorer would take a long time to process the metadata. If the files are on an SSD, it's manageable but if it's on a slow drive (especially if it's a secondary drive and the chipset lets the drive to enter sleep mode) it can take a lot of minutes.

This only happens if the folder's view is set to "Details" and the metadata tabs are visible. If the folder has a lot of general files (scripts, for example), it will load in normally.

Steps to reproduce

  1. Put a file with a lot of media files in a drive (preferably, not the main one).
  2. Make sure that the view is set to "Detailed" and you have a few tabs that are related to the metadata of the files (Title. Artist, etc.).
  3. Open the folder.

Bonus:

  • In a secondary drive, make sure that it's allowed to enter sleep mode (as far as I know, the Intel Rapid Storage Control Panel does let you set the power saving mode for the secondary drives).

Expected behavior

The explorer would show all files. After a few seconds, it would show the metadata for all files.

Actual behavior

File Explorer takes a long time to load files. Sometimes, it does this:
image
Or the window hangs.

@bitcrazed bitcrazed changed the title [File Explorer] Very slow when there are a lot of media files. File Explorer very slow when there are a lot of media files. Jul 31, 2020
@asklar
Copy link
Member

asklar commented Aug 7, 2020

@acemod Normally, file explorer will only try to gather information about the items that are currently visible and pre-fetch some more in case you want to scroll in either direction, so having a large number of files shouldn't affect performance too much. However, the shell is extensible by 3rd parties, and one often finds that these extensions can end up slowing down the UI. It would be good to know what kind of shell extensions you have installed in order to narrow down the culprit. My guess is that one of the codecs you might have installed is trying to extract information from a file on the UI thread and is taking a long time. There are 3rd party apps such as shellexview that you could use to try to narrow down what might be causing this issue.

@FirehawkV21
Copy link
Author

Well... the only codec I had installed is Xiph.org's Codecs installed (not counting the codecs that are on the Microsoft Store). I removed and it didn't do anything. I'm going to check the other extensions I have installed. Looking at the list in Shellxview, I don't see anything that could affect media files in File Explorer. I'll attach the list of extensions I have, just in case.
3rdpartyextensions.txt

Side-note: I wonder if it's possible to move the fetching data to a background thread. Granted, it could break some extensions, but that could alleviate the issue by a lot. I didn't make any shell extensions myself, but it could be a good idea.

@sylveon
Copy link

sylveon commented Aug 20, 2020

I'm having a similar issue with a ~400-file folder (it's the folder where I dump my gameplay recordings). It's a mix of H.264 media files, H.265 media files, and a couple of PNGs (the last from accidentally hitting ReLive's screenshot hotkey while playing games). It's about 65gb of media files in total.

Loading it takes a long time (around 2 minutes), which is very impractical if I want to quickly share something from here.

This is a video of the folder loading: https://yiff.forsale/GiganticBowedEmboar.mp4

The folder where I store my Steam screenshots has this problem, but less pronounced: https://imgur.com/tlQaEmI

The only third party shell extensions I have are IconViewer, TC4Shell and the Radeon Software shell extension, none of which should have anything to do with media previews:
image

I installed no third party codecs.

@asklar
Copy link
Member

asklar commented Aug 20, 2020

@sylveon shell extensions can negatively affect performance for files other than the ones they purport to add functionality to, so one thing would be to disable all those temporarily and see if load times improve. The main thing though is I noticed those folders are not the usual user videos/pictures folders, so they aren't indexed by default. Can you turn on Indexing for these folders and let things run for a bit until they get indexed and report back? you should see improved load times that way.

@sylveon
Copy link

sylveon commented Aug 20, 2020

Adding them to the system index did not help unfortunately.

@FirehawkV21
Copy link
Author

So... I turned off all of the shell extensions that were third party and it didn't improve the load times at all. Indexing did improve the load times on me. I do wish there was a better way to load anything that isn't indexed. Especially since the hard drive (in my current laptop) is connected to the SATA slot that was the DVD drive before. True, HDDs aren't as demanding as SSDs in bandwidth but combined with the power settings (since the hard drive can also go to sleep mode or turn itself off) the delay may fluctuate.

@calculuschild
Copy link

I am experiencing this as well with my folders full of recorded video. No shell extensions that I am aware of.

@StevenWooding
Copy link

It's a feature that analyzes the folder and try to find out which view mode is best to view the current folder. You can't disable it from what I could google. So I installed another explorer called explorer++. And it works very well since it's very very fast and it looks like the normal windows explorer, so there isn't much of a learning curve. It's also open source so you can feel safe that there isn't any malicious code inside it. You can download it on explorerplusplus.com

@calculuschild
Copy link

calculuschild commented Apr 27, 2023

Thanks for the tip!

It's a feature that analyzes the folder and try to find out which view mode is best to view the current folder.

Perhaps the display mode could be cached instead of re-analyzing every single time the folder is opened? (And why does it take 2+ minutes to see that 100/100 files in the folder are .MP4 or whatever? That should be instantaneous.)

@StevenWooding
Copy link

I agree. The caching of the view would be ideal! But I don't think it's on the top of the list of todo's in Microsoft list of fixes. Especially that they are now throwing all their resources at AI development. So until then we might need to find another solution.

@jrm523
Copy link

jrm523 commented Dec 27, 2023

How is this still an issue three years later? Microsoft! What is going on?

@sunny127
Copy link

I found the solution for the problem here:
https://www.youtube.com/watch?v=t2eN3kq2Dm8

@calculuschild
Copy link

I found the solution for the problem here: https://www.youtube.com/watch?v=t2eN3kq2Dm8

Can confirm this works. In the folder, Right Click -> Properties -> Customize -> Optimize this folder for: "General Items".

The youtube video comments that his video folder takes ages to open "because it's trying to calculate the lengths of all the videos". If that is the true cause, seems like that should be something that can be sped up or cached at least.

@rafalfitt
Copy link

I found the solution for the problem here: https://www.youtube.com/watch?v=t2eN3kq2Dm8

Can confirm this works. In the folder, Right Click -> Properties -> Customize -> Optimize this folder for: "General Items".

Sorry: this is a workaround, not the proper solution.

@dermoth
Copy link

dermoth commented Feb 29, 2024

UPDATE: See my next comment

I noticed the same thing, it takes a while even with just about a hundred files. One useful distinction though: I noticed it on my Captures folder where I was recording video using the xbox game bar, but only after conversion to HEVC. My script keeps the originals in a different folder in case I need them, so:

Originals folder: >80 files, all H.264, on open and refresh listing displays instantly and timestamps appear asynchronously on visible items only.

Captures folder: ~115 files, all HEVC (H.265), on open and refresh listing remains blank for about 10-15 seconds (with only the "Working on it..." message), then files shows up with all their timestamps pre-loaded.

There is clearly an issue where Explorer processes HEVC files differently, in a non-asynchronous way. This is a work computer and I keep a thigh control on installed 3rd party software, and avoid in particular anything that adds 3rd party shell extensions.

@dermoth
Copy link

dermoth commented Mar 3, 2024

Actually scratch my last comment. I renamed the Captures folder to Captures-old, still inside Videos,and file info started loading asynchronously and it was back to being very fast. It's the same for subdirectories created inside Captures.

Then I recreated a new Captures folder and moved the videos back there, the old behavior returned.

IT appears to be tied to the path, not even the folder settings,and I could not see any different settings between the two folders in Explorer settings... I'm looking into the registry now but my hopes are slim.

@aymen157
Copy link

Actually scratch my last comment. I renamed the Captures folder to Captures-old, still inside Videos,and file info started loading asynchronously and it was back to being very fast. It's the same for subdirectories created inside Captures.

Then I recreated a new Captures folder and moved the videos back there, the old behavior returned.

IT appears to be tied to the path, not even the folder settings,and I could not see any different settings between the two folders in Explorer settings... I'm looking into the registry now but my hopes are slim.

This is the case for me too.. Weird. Slowness seems to be tied to the folder path name. Did you find a solution ?

@AdamBraden
Copy link
Collaborator

Regarding the general perf of File Explorer with a lot of video content, double check if the folder is sorted by Length. Normally Length should fill in asynchronously, however when sorted by length, then FE needs to get this data causing a lot of I/O and delaying FE from refreshing the list.

As for 'Videos\Captures' folder, generally any new folder created under Videos defaults to a folder type of Video, not General Items.

@dermoth
Copy link

dermoth commented Aug 6, 2024

Hey, sorry I thought I had replied already - it turned out that indeed I was sorting by date, and rather that using the file's date Explorer was using the date from MPEG metadata. Since it appears to be the same field this is not super intuitive, nor there appear to be a way to disable that behavior.

For Captures this is particularly annoying, all captures are done on the computer so the file and metadata dates are both as accurate, but I can't sort by date if I have lots of files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests