Wednesday, April 7, 2010

Folder Size 2.5 is done

I made some good improvements since the last post, so I decided that this is good enough to call 2.5 done! So now everyone can easily use the latest code. If you're still running XP, that is. :)

I fixed a bug where stale values could get into the cache! I've seen this happen very rarely, like once a year, and was puzzled by it for a long time.... so hopefully that old bug is fixed.

And some minor stuff.... improved error event logging, service is more resilient against invalid path names, fixed bugs that were introduced since 2.4.

Basically, 2.5 should be faster, more correct, and more polished than 2.4, but no major changes in the core scanning.


Monday, January 4, 2010

Almost finished 2.5

Hey all, I've been using some of my Christmas vacation time to finish 2.5. I know a lot of XP users are finally switching to Windows 7, so there might not be too many people who can use this new version. But it should be released anyway!

I've made a few fixes in the control panel to handle errors betters, and fix clipped text in some languages with some DPI settings. With Windows 7, it's quite easy to change the system language, so I've gone through and actually looked at the control panel in all the languages.

I also changed the way the cache works for multiple users. With 2.4 and earlier, the service scanned the file system as the SYSTEM user. All users on the machine would see the results of that scan. This was a security problem, because I could see the total size of a folder whose contents I wasn't permitted to see! Also, I couldn't see the total size of my own folder, if I didn't also give SYSTEM permission to read it.

Now with 2.5, all scanning happens with the user's credentials, so you get the results you expect to see. This also means that if you log in with a few different users, a separate cache will be created for each user. This uses a bit more CPU/memory. But proper security instead of performance is the right way to go these days, right? Most PCs only have one user log in anyway.

So I need to do some final testing (make sure I haven't broken anything) and then post the new MSIs. Yay!

To clarify, NO this new version still does not work in Vista. Or Windows 7!

Yes, there are some standalone programs you can use to show total folder sizes. So try those if you want. I was trying to make folder sizes an intrinsic part of the file browsing and selection process, and running a separate program does not do this for me.

Monday, February 2, 2009

Closer to 2.5

Hey, this time I am actually getting closer to releasing a new version. Sorry it's taken so long.

This update is a few minor fixes and updates. The real killer feature that everyone is waiting for is Vista support, of course. I found this thread of someone else trying to get help from Microsoft implementing another custom column. Read it here:

So as you can see, Vista support isn't happening for me or anyone else.

I was doing some experimenting with a new Size On Disk column, that would be similar to the Size On Disk display in Explorer's folder properties. But, if I understand how NTFS works correctly, I believe the Size On Disk in Explorer's folder properties is broken! Let me explain:

The common understanding of file storage on most file systems is that file contents are written into storage units called clusters, typically 4K each, which allows the drive to manage its allocated space more easily. Since the drive must allocate each file a number of clusters, it is likely that more space is given to a file than is needed for its contents. This results in some wasted space (0 to 4095 bytes) per file. This is confirmed by Windows Explorer, which shows each file's size on disk rounded up to the next multiple of 4K in file and folder properties. This is all true for FAT file systems.

However, NTFS has another optimization called Master File Table Resident files, where small files (less than around 700 bytes) are stored in the table that stores other metadata about the file. The file does not use up any clusters! Therefore it makes no sense to round its "Size on Disk" up to the size of the full cluster, as Windows Explorer does. That's why I believe its Size on Disk display is misleading. Here is Wikipedia on resident files in NTFS:

Could Folder Size show the true size and thus improve on Windows Explorer further? I haven't yet found an API to report whether the file is resident or not. Let me know if anyone knows how to do this.

So here's a list of the improvements that will be in this update:

New display mode: unformatted bytes. This may help some people who are confused by the other units, and helps for accuracy testing.

New icon for the control panel, submitted by Christian Helmrich.

New translation: Russian, submitted by one Игорь Петрович.

New Credits dialog. This was suggested by the Russian translator, and is a good idea. Now everyone who has submitted something that's made it into the final program has some recognition.

Optimization: The service process (FolderSizeSvc.exe) should use less memory! Informal measurements show a 20% reduction.

Also, I'm currently trying to simplify the installation MSI a bit. I've always hated how it asks if you want a Typical, Custom, or Complete install, when they're really all the same thing. Custom lets you change the directory, so instead of asking which install type, the installer should just ask what directory to install to. This should be a simple change, but I'm editing the MSI manually with Orca, which is painful.

So, if you don't install this update, you won't be missing out on much. But it's nice to have some updates... hopefully I'll have it ready soon!

Wednesday, May 14, 2008


Good news, everyone! There's been some contributions to the project lately, which is really great! I thought that Folder Size would die a slow death along with XP, but lots of people are still using it, and I have enough contributions that it's worth making them into an updated version.
I have a smooth looking new icon for the control panel, a potential Russian translation, and a code patch that I didn't notice until now, which should protect the service from getting carried away by symlinks on network servers.

Friday, November 16, 2007

Thanks for the support

Oh yeah, thanks for all the nice mails I've received from people who love the program! I started this program mainly for myself (couldn't understand why no one else had done it this way), and I'm glad so many other people feel the same way.
It was great to see my question answered on Raymond Chen's legendary blog, The Old New Thing:
The answer ("because it creates too much network traffic") is overly simplistic, but makes sense from a Microsoft point of view. They'd rather be safe than sorry. Still, the Mac has a built-in folder size option, off by default, but easy to turn on. In the comments, I notice that many people who don't use the program claim they wouldn't want to lose resources to the feature, because they don't use it anyway.... not noticing their own circular logic.
Also, I put a new Donate button at the bottom of the main page. Feel free to use it if you like. If you want to use the program for free, go ahead - I don't see why you shouldn't get to use a program that already exists just because you don't want to pay for it. This is my return for the years of amazing things I've enjoyed for free online. When copying and distribution is free and infinite, property rights are meaningless.

Version 2.4 Released

Finally, 2.4 is ready for download. Check the changelog or the source code for new features and fixes. One much requested new feature is disabling drive types. Now you can disable folder size for your network drives. Or disable it for your USB drive if it's not unmounting properly. But you might as well leave them all on, because it uses less memory now. If you could look what is in all the memory it's using, it would be mostly strings of paths. These are now all relative paths instead of absolute paths. It's still storing every relative path twice, so it could be cut down quite a bit more.
Finally you can download a 64-bit version! I've had it working for a while, but wanted to finish other changes before making install packages. It's kind of a pain to manually make installers, and make sure I haven't screwed up anything in the code. After I posted the 64-bit version, the next day I noticed that I posted the wrong file, that had a bug with logging into network drives. I updated the file without changing it in any other way, which is not a nice thing to do according to the MSI rules, but I didn't want to update all those files too. Hopefully no one will notice. It will be interesting to see which package is more popular!
I don't know if there will be a Vista version. An Ubuntu version is looking more likely.

Tuesday, November 13, 2007

New Release Imminent

Hey, thought I'd finally post something here about the status of the new version. I'm doing some final testing now on version 2.4! There are some new features (64-bit support, disabling drive types, new translations), some bug fixes (fixed size updating with moving folders), and some optimizations (should use less memory), so hopefully there's something for everyone. However, I haven't fixed some of the bigger issues - Vista support, and the scanner performance problem with too many files in one folder. But I should get this nice collection of fixes out. So I'll probably do a few more days testing before calling it done. There's nothing worse than posting a new version, then finding a critical bug immediately, and then fixing it requires updating all the version numbers again. So, check back for updates in a few days...