How to prevent Windows Explorer from slowly reading file content to create metadata?

22

11

We have directories containing hundreds of video files. When using Windows Explorer (Windows 7 64 Pro) to browse and rearrange these directories, Explorer slows down to an unusable level, uses gigabytes of RAM, and pre-empts or slows other programs (such as Media Center) from using the same disk while this is in progress.

This is accompanied by a very slow-growing green bar in the Address slot.

What Explorer appears to be doing is reading the video file content to produce thumbnails, or obtain other metadata. This is not useful for our purposes, so we'd like to disable this behavior. How does one do that?


These threads may be related:


2014-04-14: Summary of suggestions and findings

I think at this point we're well satisfied with the answers, and remaining symptoms are unrelated to Windows Explorer. So, herewith a summary of suggestions and a few other things we learned.

General considerations

Disk wake-up: Initial slowness when accessing a disk after a long period of disuse may be attributable to the disk having gone to sleep.

Disk errors: Obviously if there are hardware errors which compel retries, this will gravely slow down Explorer and any other program.

Disk contention: Other programs performing intensive activity on the same drive will obviously contend with, and slow, Explorer's attempts to display a drive's contents. If Explorer needs to read only the directory, then impact may be minimal, but if Explorer also needs to read each file for metadata, then contention problems will be greatly magnified.

Disk contention from anti-virus software: Explorer's attempts to read metadata may prompt AV software to read and OK each file first. Consider disabling AV for trusted file types (for example, wtv files saved by Media Center).

Explorer settings

Disable display of thumbnails: "Organize" → "folder and search options" → "view" → put a checkmark in "always show icon instead of thumbnails" → press apply and close.

Disable gathering of video-specific metadata: Culprit folder → "properties" → "customize" → under "optimize this folder for:" open the drop down menu and choose "general items" → place the checkmark in the box under the drop down menu at "apply to all subfolders" → press apply and close.

Disable even more the gathering of video-specific metadata: In a culprit folder's "detail view", remove any columns based on video file metadata not in the file system's directory information. This includes the Length (duration) column, and also the Date column (based on video metadata, and distinct from the file system's "Date created" and "Date modified" columns.)

In the registry

Disable "Property Handlers" for video filename extensions (such as wtv, mp3 etc). This, of course, would apply system wide, not just for particular directories. Can be accomplished with RegEdit, or with 3rd party program ShellExView. (See Answers for details.)

More on thumbnail and other caches

We noted that after disabling thumbnails and metadata, when we re-enabled them, performance was speedy. (Ie: The green bar of slowness didn't return.) This suggests that the changes did something regarding the thumbnail cache(s), perhaps deleted them and later rebuilt them. Turns out that by default Explorer saves thumbnails in each directory (in thumbs.db) and also in the user's AppData\Local\Microsoft\Windows\Explorer directory in a set of thumbcache*.db files. It's possible these get into a bloated or otherwise slow state, and deleting them might prompt faster operation.

Not known (by us) is whether Explorer caches any other metadata info (such as Length, Date, Location, Protection and so on).

Other interactions

Not attributable to Explorer per se, but potentially useful clues.

We noted in Task Manager > Resource Monitor that Media Center was performing bad behavior that created a lot of disk activity: A media center component, ehrec.exe, would endlessly cycle through reading a few k of data from a particular set of video files -- on one drive, about 200 video files. It is as though Media Center is unable to complete reading metadata from those files, and just keeps trying to read files for which it doesn't have complete metadata. These files seem undamaged as far as the file system is concerned (can copy without problems). When we asked Explorer to display directories on this particular disk, conceivably Media Center's activity competed for disk access time. We disconnected this drive for other tests.


Thanks to all respondents.

gwideman

Posted 2014-04-08T05:17:07.207

Reputation: 335

The solution you've linked could well work, if the PropertyHandlers key contains the extension of your video files, then removing the GUID (which kinda just pointing to a dll with the metadata code in it) could well work. You can backup the key before hand. – cjb110 – 2014-04-10T07:20:50.580

@cjb110: Are you speculating that creating an essentially empty PropertyHandler key would pre-empt Explorer from fetching metadata? That seems plausible, but have you actually tried it? – gwideman – 2014-04-10T07:43:38.443

Pretty much, I would try but don't have a Win7 machine to hand. It's assuming that the PropertyHandler key is 'main' way to do this. If you don't see your extensions then I wouldn't bother...but it would be fairly harmless to try if they were there, as you can easily backup the higher level key. – cjb110 – 2014-04-10T08:54:09.567

Oh and removing the extension key completely seems better than removing or making the GUID invalid. – cjb110 – 2014-04-10T08:55:19.863

@cjb110 Light-bulb moment: In that PropertyHandler suggestion, I finally took note of the '#' prepended to the GUID, and realized it was to invalidate the GUID, not just some syntax to indicate a number. Doh! OK, now it's clear what that solution does. Thanks for the prod. – gwideman – 2014-04-10T22:34:34.773

1Well, this has been the first time i interacted on this site, and I must say that i am impressed by how things are handled here. I originally only wanted to join stackoverflow for some programming related questions, and feared that stackexchange turn out to be another "yahoo! answers". I am quite happy that this doesn't seem to be the case. Good to hear that you seem to have fixed your problem! Both of us seem to have learned something, also! Cheers! – keen – 2014-04-14T16:03:27.330

Answers

11

FINAL UPDATE:

OP has summarised all his findings completely and concisely in his question post. I see no reason to delete my suggestions, but i recommend you read his post instead of mine if you are for a quick solution to your problem.


You should try two things:

  1. In Explorer, click on "organize" -> "folder and search options" -> "view" -> put a checkmark in "always show icon instead of thumbnails" -> press apply and close.

  2. Now right-click on the culprit folder -> "properties" -> "customize" -> under "optimize this folder for:" open the drop down menu and choose "general items" -> place the checkmark in the box under the drop down menu at "apply to all subfolders" -> press apply and close. This will apply the new folder view settings to the chosen folder and all the subfolders which are contained within.

I am german and thus have a german version of windows, so maybe some of those options above are translated slightly differently, but you should be able to find them nonetheless.

Update 1:

I think you are on the right track with the metadata. Depending how the videos are encoded, the metadata could be either at the beginning, at the end, or even somewhere in the middle (which is rare, though). I am guessing that those video files were encoded with some unusual properties (you probably produced them yourself?) which makes explorer read in the whole file from beginning to the end to extract the metadata, which obviously takes a while if there are many big files in the folder. I have seen explorer read the full length of a giant exe file to display the embedded icon at the end.

So, i think you have it figured out there, identifying and disabling the columns which need to extract metadata from the view in explorer (together with the disabled thumbnails) should obviate explorer's need to read in those files, which should solve your problem.

Columns you should probably not use are something like: date taken (as mentioned in one of the links you posted, date taken is very differently from the creation date of the file), length, resolution, location.

Columns you should be safe to use would be attributes which can be read directly from the directory of the filesystem like: file creation date, file modified date, size, file type.

If you indeed need for your sorting some of the attributes which should be disabled, i think that maybe the most practical solution would be to look for an alternative file browser, and check if it handles the situation better. You could then use explorer like you are used to normally, and use the alternative file browser to handle your video folders.

You also have the possibility to perform many basic file-oriented operations from your built-in command line interpreter cmd, it doesn't care about metadata and can be a simple and efficient tool for copying, moving or deleting files and folders. You could then even automate things by using batch files. This is most probably not the solution you search for, though, since cmd doesn't even have a graphical user interface.

Update 2:

I just read your second update and i am happy to read that your problem seems resolved (for now, at least). Maybe it really was just a matter of the thumbnail cache getting overcrowded. I could imagine those thumbs.db files getting bigger and bigger, if you move files from folder to folder frequently. I suspect it actually keeps a thumbnail in that cache file for every file which ever was in the folder. Maybe there is some sort of garbage collection mechanism for those files, too, but it failed in your case.

So, if you were moving video files from folder to folder en masse, and always using the same folders for that (eg. not creating new ones) maybe we have found the source of your problem...

If your system shows the same symptoms again in the future, you could just try deleting the thumbnail cache. For that you need to:

"windowskey + r" -> input "cleanmgr" and press return -> choose the drive where the video files are on (only if you actually have multiple drives/partitions) -> choose "clear thumbnail cache" or something like that -> run cleaner

keen

Posted 2014-04-08T05:17:07.207

Reputation: 341

Is it possible to disable "Date", "Tags", "Length" etc slow metadata columns on an OS-wide basis, instead on a per folder basis? – gus – 2014-11-28T04:02:23.567

Thanks. Initial test of these suggestions are mixed, so there may be something additional needed. We'll try some more variants. – gwideman – 2014-04-10T07:16:48.517

I have more guesses, although i have less confidence in those: Are you by any chance running more than one anti-virus program? Or maybe an anti-virus program from one vendor and a HIPS from another? Have you installed any Codecs or Codec Packs? My last guess would be one or several damaged files in those folders. Does Explorer only slow down in the video folders? – keen – 2014-04-10T08:25:12.340

Thanks for the additional ideas. I've added a report of results so far. Antivirus: MS Security Essentials. No added codecs that I'm aware of. Damaged files, difficult to rule out, but not conspicuously so, since they do eventually produce thumbnails when that's enabled. Slow in folders with many video files. Pretty sure it's the "video" aspect that was slowing the initial display. The "many" aspect may be slowing the sort. – gwideman – 2014-04-10T23:18:03.577

if you are running only security essentials, that is almost certainly not the problem (you should maybe look for an alternative, though: link ). running two real-time scanners at the same time is known to produce strange problems, so i just took a guess. sorting something is just comparing values, something a computer is supposed to be very good at, i think you are on the right track with the extraction of some metadata slowing the process.

– keen – 2014-04-11T01:11:47.020

1Thanks for your additional comments. Definitely concur on the principle that details from the directory are quick, whereas data items read from each file are potentially slow. Our main use case is Windows Media files, so not some self-made format. And of course resorting to alternate software and/or command line is always a possibility :-) But dang it, Explorer should be beaten into submission! – gwideman – 2014-04-11T07:23:37.273

haha yeah c: i also felt that to switch would be admitting defeat. well, have you tried disabling the columns? i think you basically need to deactivate everything under "size", if you right-click on the columns. – keen – 2014-04-11T09:45:35.960

yes, as I noted in my Update 1, we removed the Length (duration) column, leaving only directory-based details, and that sped things up considerably. But, in another round of testing, in which we reinstated some of the supposed slow features, we couldn't get performance to slow down. So, difficult to isolate what's causing the problem. Perhaps we deleted a cache that had got too big or confused? We'll test with another machine that's usually even slower (slower CPU, less memory), and see what happens. – gwideman – 2014-04-11T12:18:00.080

maybe there are some leftover thumbnail cache files. you could try "windowskey + r" -> input "cleanmgr" and press return -> choose the drive where the video files are on (only if you actually have multiple drives/partitions) -> choose "clear thumbnail cache" or something like that -> run cleaner ---

obviously, explorer will then have to rebuild that cache in folders where it is enabled, but that shouldn't take to long (you will notice the thumbnails loading slower but only one time) – keen – 2014-04-12T06:06:39.460

2

There are three GPO settings when changed, will probably achieve the behavior that you want globally on the computer.

enter image description here

To get there, launch Group Policy Editor from a command-line.

gpedit.msc

Navigate to the following node.

User Configuration\Administrative Templates\Windows Explorer

The in-built documentation would be a good start to know what each setting does.

Do take note you need administrative rights to make changes to the GPO settings.

MFT

Posted 2014-04-08T05:17:07.207

Reputation: 542

Thanks, but this completely disables thumbnails for all file types, all directories, right? If this was just for video files, it might be a candidate solution, but we don't want thumbnails disabled for ordinary images. Regardless, might be a useful test. – gwideman – 2014-04-10T21:35:07.817

2

If you want to apply it specifically for video files, you might want to look at a similar question answered here: http://superuser.com/questions/152272/how-do-i-disable-video-thumbnails-in-windows-7

– MFT – 2014-04-11T06:35:15.497

Interesting link. Looks like shexview provides a UI to the PropertyHandler reg keys mentioned in the article I linked in the question. Could be useful. +1 – gwideman – 2014-04-11T06:55:58.343

1

My solution was arrived at indirectly. I noticed that MKV files contained a "date" that couldn't be changed by normal means so that the file would reflect when I got it, as shown in the file properties. In desperation I changed the column in windows file explorer from just "date" to "date created" and then set the view option to make this the default for all folders. Not only did this fix my sorting problem but the GROD was also cured. Not having to dig very deeply into the tagging structure of every file is obviously the reason for this cure.

jimekus

Posted 2014-04-08T05:17:07.207

Reputation: 11

0

I had exactly the same problem on my Windows 7, 64 bit machine. It started a couple of months back, when opening a folder on an external Western Digital drive the metadata for the files in any folder would take a couple of minutes to display, whereas I remember they used to show almost instantly. Opening a file, then closing it, would cause the entire folder to refresh again, and another two minutes. So I did some investigating (solution follows):

  1. I started the laptop in Safe Mode, and all the slow problems with Windows Explorer were gone.

  2. I restarted the laptop normally and went to Start, then typed msconfig in the run box, and selected the Startup tab. I disabled almost all the startup items (except any microsoft or intel processes). Rebooted - No change

  3. Using msconfig again I re-enabled all the processes I disabled in step 2. Then I went to the Services tab. I clicked on the Status heading to sort all the services into Running or Stopped, and examined all the Running services. I disabled all my anti-virus and anti-malware first (Avast, AdAware, and Spybot). Rebooted - Solved!!

Now when I open a folder all the files with their metadata appear almost instantly. By a process of elimination it was the AdAware program that was causing the slowdown. I uninstalled it, and replace it with Malwarebytes. That does not slow my machine down.

Lesson: Always try Safe Mode first to see if the problem is solved, and if it is then use a process of elimination to see which process or service is causing the slowdown.

Rock Vacirca

Posted 2014-04-08T05:17:07.207

Reputation: 1

-1

This is caused by the Windows Search service. You could just disable the service by setting the Windows Search service to Disabled and manually stopping the service (right-click on the service and select Stop). Microsoft puts the service there to supposedly speed up Windows (yeah OK, whatever).

You can also leave the service running and just disable it for select file types. Once you determine the file types that you want to disable the indexing of (.AVI, .MPEG, .WMV, etc.):

  1. Open Control Panel
  2. To select Windows Search, enter "Indexing Options" into the search bar and open it. Or you can select it by changing the View to either large or small icons and then opening Indexing Options. Or you can do it using Category View - from the main Control Panel window, select "System and Security" - "Action Center" - "View performance information" - "Adjust indexing options".
  3. Click on "Advanced" and then select the "File Types" tab
  4. Unselect (remove the check box) next to the extension(s) of the file type(s) that you want to disable the indexing for.

Hopefully this helps speed things up for you. Good luck!!

STGdb

Posted 2014-04-08T05:17:07.207

Reputation: 483

1Indexing Service cannot slow Explorer down, however, it will make disk access slower while it indexes files. On the other hand, Indexing Service is smart enough to concede the resources if user interaction is detected. – Alexey Ivanov – 2014-04-10T12:52:06.393

Touche - guess it all depends on your perspective - thanks – STGdb – 2014-04-16T17:13:43.043