dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.24k stars 1.76k forks source link

8.0.92 make app size bigger #25750

Open albilaga opened 1 week ago

albilaga commented 1 week ago

Description

We are updating our app from 8.0.82 to 8.0.92 and have increased file size to 40MB for the .apk. This is really unexpected because that is too much jump. 5MB might be quite reasonable but we didn't expect it to increase 40MB. After we check what is inside that increased and compared the size we found the issue is our res folder is much bigger. Is there any changes from how resizetizer work? Image The right is from 8.0.92 and the left one is from 8.0.82. We then tried also to reproduce with another MAUI sample app and found with smaller app we found increase app size on 5MB. With big app like us, then it is hit us with 40MB app size increase on Android

iOS app also increased around 10MB and after we check the inside it is caused because of the resources size in our folder increased as well

Steps to Reproduce

  1. Clone https://github.com/albilaga/MAUI-store-app
  2. Build with release dotnet build -c Release
  3. Copy the apk from bin folder
  4. Clean obj and bin folder
  5. Checkout branch maui8.0.82
  6. Build with release dotnet build -c Release
  7. Compare apk size from those 2. 8.0.82 will come around ~53.9MB but apk built with 8.0.92 will come around ~58.6MB. The image resources in here is very little compared to what we have Image

Link to public reproduction project repository

https://github.com/albilaga/MAUI-store-app

Version with bug

8.0.92 SR9.2

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.82 SR8.2

Affected platforms

iOS, Android

Affected platform versions

Android 11 and up. iOS 15 and up

Did you find any workaround?

No response

Relevant log output

No response

bronteq commented 1 week ago

In Maui 8.0.90 was merged this about Resizetizer https://github.com/dotnet/maui/pull/23924

albilaga commented 1 week ago

Ah I miss that. So now it become more high quality which is contributing to our app size. Which is not mentioned in release notes. Thank you @bronteq . So for now for us we can just accept the increasing file size right?

thisisthekap commented 1 week ago

I understand that the fix done in dotnet/maui#23924 is important. But to my point of view, this should be configurable while keeping SKFilterQuality.High as default value. I am currently working on a PR for making that configurable.

similar-issues-ai[bot] commented 6 days ago

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

thisisthekap commented 4 days ago

https://github.com/dotnet/maui/pull/25686 fixes this, because it enables us to set None as value for FilterQuality, which brings back the old behavior.