Viewing Folder Sizes in Explorer

Good morning AskPerf.  Today’s post is a very short one, but it does address one of our most common Shell / Windows UI questions.  That question is, “Why can’t I see the size of folders in Windows Explorer?”  The simple answer is that the behavior is by design.  You can view the size of folders by hovering over the folders in Windows Explorer (as shown below):

The primary reason why the Windows UI does not provide this functionality is performance.  Every time you navigate through a folder structure in Windows Explorer, the OS would have to perform a recursive scan of the subfolder structure within each folder to get the file and folder sizes and add them up.  This would create significant processor overhead – especially if you think about scenarios (home folders for example), where the nested directory structure for each user may be several levels deep and consist of thousands of files and folders.  Extend the scenario from the local machine and add in users who are browsing through a directory structure across the network and the performance hit would grow exponentially.

The hover behavior above is governed by the “Display file size information in folder tips” setting on the View tab in Folder Options:


There are instances where turning this option off may provide a performance increase (for example, complex, multi-level nested folder structures) on the local system.  When viewing complex folder structures across the LAN/WAN, client machines may experience significant delays.  One other setting to be aware of is the NoRemoteRecursiveEvents registry setting (HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer).  When this value is set to 1, Change Notify requests are turned off for file and folder changes occurring in mapped network share subfolders.  If a file or folder is change in the root and first folder level of the mapped share, a Change Notify event is still sent by the server.  However if a change is made at the second level (or deeper) in the structure, no Change Notify is sent.  This registry setting is set on the client machines.

Additional Resources:

– Prabhakar Shettigar