I'm developing an app for Apple Vision Pro. The asset directory in my project is small:
$ du -sh Assets.xcassets
292K Assets.xcassets
However, after build assets in the resulting bundle are 15MB!
$ du -sh MyApp.app/Assets.car
15M MyApp.app/Assets.car
That's two orders of magnitude! Considering that binaries of the app are a couple of MBs, the app bundle is basically all assets! WTF?! It seems somewhere in build process several very large assets are generated:
> assetutil --info Assets.car | grep "SizeOnDisk" | sed 's/^[[:space:]]*"SizeOnDisk" : //' | sed 's/,$//' | sort -rn | head
2860982
2860982
2859215
2749277
2658939
1049666
163374
163374
136454
79949
The top one has this in the output of assetutil
:
{{
"MipLevel" : 0,
"RenditionName" : "avp_app_icon_frame.png",
"SHA1Digest" : "1F511AC99BA7EE4B7735FDC84F64BA1CDCB044734ED7D3A4AEC1F07AEA90B969",
"SizeOnDisk" : 2860982,
"Texture" : {
"AssetType" : "Texture Data",
"Compression" : "lzfse",
"Encoding" : "ARGB",
"PixelHeight" : 1024,
"PixelWidth" : 1024,
"Rowbytes" : 4096,
"Texture Pixel Format" : "R32 Float"
}
}
Full 32bpp basically w/ lz compression?! Why? What's going on? How do I turn this off?