In order to calculate sizes of folders, ShowSize has to traverse the complete list of files within subfolders to add up file sizes and produce the folder sizes report. This scan may take some time, especially on huge disks and network shares. In this article, I will explain how ShowSize uses smart caching to save on time of rescanning within the subfolders of the current scan.
Suppose you scanned a huge folder G:\users and it took about 40 seconds to produce the report. Now you want to go to a subfolder “userA” within it to see all the reports on userA. You are specially interested in the “Only Files Report” to see what is the largest file within userA.
To do this, you select that subfolder userA in the left pane of ShowSize to get the reports on it.
Since the reports need to be regenerated when the folder changes in the left pane, does this mean ShowSize again scans the file list in the folder userA? But in the last scan where we scanned its parent folder G:\users, the subfolder userA was included. Why can’t ShowSize just take the list of files from the last scan to produce the report for subfolder userA?
That’s what ShowSize precisely does and very smartly too. ShowSize keeps a cache of list of files in temporary area of Windows.
Here is how ShowSize decides whether to rescan the list of files:
- If the new subfolder that you selected is within the list of files last scanned, it just uses its cache (temporary files) to refill the reports. Note that the cache is different for each running copy of ShowSize. So for rescan it looks within its current cache only.
- If the new folder is not within the cache of its last scan, it has to rescan the list of files within the new selected folder.
- It also rescans unconditionally if you click on the Refresh button.
Now that you know how ShowSize works with its cache, you can plan ahead to save your time.
Tips on saving time based on the knowledge of how cache works:
- If you plan on visiting several huge folders on a drive, better scan the whole drive or the common parent folder if there is one, and then select the desired folders in the left pane.
- Use the right-click operation “Start another ShowSize on a folder” sparingly. If you start another copy, the second ShowSize copy will create its own cache and will need to rescan the list of files in that subfolder.
- Use Refresh only if necessary, especially on huge scans.
- If you have scanned one huge folder and now want to go to a folder on another drive, better start another copy of ShowSize on that folder so that your current folder and its cache stays with this copy of ShowSize.
If starting another copy of ShowSize is inconvenient and you tend to forget to do it when switching to another drive, use the Advanced option “Start another ShowSize when the drive changes.” This will automatically start another ShowSize when you select a folder on another drive.
- Make sure that there is enough space in the drive that contains the temporary area of Windows because ShowSize uses it as its working folder and creates all its cache files there. In the latest version of ShowSize, you can change the working folder of ShowSize to a folder on another drive with plenty of space.
Save Reports feature of Pro Edition: Network administrators often need to keep snapshots of file lists for audit purposes. The Pro Edition of ShowSize allows to save the current scan data (cache) to a file that you can view later. The nice thing is that you can view this report on any other system too. For this reason, when you are viewing a saved report, it doesn’t allow file operations on it. You can only view all the reports interactively.