Why do my .uasset files of a simple UPrimaryDataAsset have a very inflated disk size?

Hi all,

I have a simple UPrimaryDataAsset that has a single UPROPERTY(): TArray of a USTRUCT() of seven (u)int16’s. Sizeof() gives me the expected size (14 bytes). It has no pointer types or references to other objects.

I generate these programmatically and when I want to save one I follow a pretty simple sequence of steps.

  1. Make a UPackage with CreatePackage and FullyLoad it.
  2. Use NewObject<> to create my primary asset type, setting the package as the outer. I then fill with my data.
  3. Let the AssetRegistry know I’ve created it
  4. Call UPackage::SavePackage(…)

This all works, but the outcome is the file size of the .uasset is huge relative to what my napkin math says it should be. The size map correctly shows no hard references/imports, and the memory size matches pretty closely to my napkin math. But the disk size is huge.
sizemap

I packaged the project and using the Pak tool to inspect I see that it’s oodle compressed down to something below memory footprint size.

LogIoStore: Display: "../../../Sky/Content/_Sky/Islands/IslandCoreGeo/Temp_Isle_Big_01_isle_bp_PointsStandard.uasset" offset: 169967616, size: 712554 bytes, hash: [...], compression: Oodle.

Memory footprint and the size on players disk isn’t a concern, but what’s happening with the .uasset file bloat? This particular file isn’t a big deal, but we will have many of them of varying sizes and I don’t want to fill source control or dev’s hard drives with unneeded data.

Running 5.3.2.

Thanks