Sharpnado.MaterialFrame: [Android][AcrylicBlur] Performance Degradation when ThrowStopExceptionOnDraw set to True

Platform (please complete the following information):

  • OS: Android
  • Device: Android Emulator/Pixel 2 XL
  • Sdk vervion: Android SDK 28
  • Xamarin.Forms: [4.6.0.847]

Describe the bug I have noticed that when you set the ThrowStopExceptionOnDraw to True on Android, if you navigate around a few pages that have the MaterialFrames with the following settings:

  • MaterialBlurStyle=“Light”
  • MaterialTheme=“AcrylicBlur”

The app starts to get slower and slower as you use it and starts to stutter. If you turn ThrowStopExceptionOnDraw to False everything works smoothly.

To Reproduce I have attached a sample project, as well as the GIF below. In the sample, I have a few MaterialFrames with the settings specified above and I’m just navigating to that page and back. You will see that the content gets slower to load and even the back arrow animation in the top left starts to stutter.

Screenshots (if applicable)

ThrowException App1.zip

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (12 by maintainers)

Most upvoted comments

Next version should be published next week

@mauro-dasilva some update: https://github.com/xamarin/xamarin-android/issues/4987 seems to find a workaround for the exception stack getting bigger and bigger. Just have to throw new StopException each time instead of throwing the static instance 😃

@mauro-dasilva we made some good progress with the Xamarin.Android bug. Now let’s just hope that the “growing” exception stack will be fixed as well. I’m worried they will only fix the logging in adb but some weird bug will remain.

Thanks so much for you efforts. I will go post on that thread to hopefully get some traction. Just wanted to also say your projects are really fantastic and I just saw your new one with shadows. Its really AWESOME! Keep up the great work bud!

Now there is something you don’t hear everyday 😃 Hopefully this bug is a good one for you then 😃

thanks for the updated sample, I will investigate