Skip to content

Conversation

@0xilis
Copy link

@0xilis 0xilis commented Sep 9, 2023

Discussed in DMs but might as well repeat.

Xcode converts all images to an iOS-specific PNG derivative. This increases the total size of the images; however, the "benefit" of this is that it saves a conversion step during loading.

However, this often always results in the exact opposite affect; due to there now being more data to read from the NAND, loading often takes longer since NAND reads are much more costly on performance than the little it saves. https://imageoptim.com/tweetbot.html https://imageoptim.com/xcode.html This is pretty old but should demonstrate the negative performance affects. Optimizing an asset for size is (at least from my experience) better for load times.

To my knowledge all icons are already optimized for size (I ran them through oxipng and it couldn't find anything) before being ran through Xcode which undoes a lot of optimizations when COMPRESS_PNG_FILES=YES, so no need for me to compress any further. At least from my experience, this change takes us down 0.3MB, which admittedly isn't much but still is an improvement in size and load times.

If there's anything I should change with this, LMK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant