"Size on Disk" erratic/showing 0 bytes in compressed NTFS folders

I was experimenting with NTFS compression and taking a look at the Size on Disk column in DOpus to see if any space was actually saved.

Its output is strange. Often it says 0 bytes, but if I ask it to recalculate it may give the correct size, or zero again. If it gives the correct size, recalculating again may gave 0 bytes again.

There seems no discernible pattern to it - while some directories are never miscalculated, some always are, but this is not affected by subdirectory or file layout or by compression efficiency. It happens with and without Everything selected in the preferences. Below you can see that Windows doesn't seem to have any issue sizing the directory itself.

Capture2

To reproduce, try compressing a folder (Properties, advanced and compress contents to save disk space) with a large number of files and/or bytes in it, such as a game.

I checked Size on Disk in another case where size and size on disk might differ substantially, i.e. many small files but large cluster size - this appears to be calculated correctly.

Sorry forgot to tag it as a bug report.

Does it still go wrong if you disable Everything in Preferences / Folders / Folder Sizes and then recalculate the sizes (or open a new window and try from there, which may be a better way to ensure nothing is cached)?

That works and it correctly estimates sizes. It shows 0 bytes briefly before populating it with the correct size on disk.

It seems what I was doing wrong before was failing to open a new lister and only switching off Everything's file count. Sorry about that.

Something to check in the Everything settings is that it's indexing all the required things. If those are missing or reported as zero, it could confuse the size on disk column.

Details here: Integration with Everything [Directory Opus Manual]

From memory Everything doesn't provide "size on disk" at all, so if a folder size comes via Everything we just estimate the size on disk by rounding up the block size.

I had set up everything according to the the example I was given here. Index folder size is unchecked; not sure why but this was what was recommended.

Do you recommend that I switch index folder size on?

Yes, follow the text. The image is only really there to show what Everything's settings UI looks like and hasn't been updated since we added that recommendation to the text.

Edit: See my later reply below.

Ok. Doesn't seem to have made any difference though - still getting a 0 bytes when Everything is on.

When it is off...

Everything, searching from it directly, doesn't appear to care if the folders are compressed or not, it just reports the size of the directory as it would be if it had no compression.

Looking at this again, the image is fine and matches the text.

It's Index FILE size that needs to be on, not Index Folder Size.

Regarding the main issue, please try opening Everything and then asking it to rebuild its index. (Everything Options, Indexes, Force Rebuild.) That has helped people with folder-size issues in the past, at least.

FWIW, doing a quick check here, so far I haven't seen the same problem on my own system when looking at the sizes of compressed folders. But I only have a few to test with.

Rebuilding the index didn't seem to do anything unfortunately.

When I go into Everything and search for files in one of these folders, it shows the size of each of the files correctly (though they are the uncompressed size). If DOpus is just fetching these and adding them, then either it means that Everything is returning nonsense, or DOpus is making some error. What I should be getting back from Size on Disk is the uncompressed one Everything calculates, not 0 bytes.

Edit: Actually scratch that. Everything doesn't report "Size on Disk" at all, and shouldn't even be being called.

Why this seems to trigger with NTFS compression only makes no sense to me.