maui icon indicating copy to clipboard operation
maui copied to clipboard

Perf : ButtonContentTypeConverter now using InvariantCulture to parse…

Open jonathanantoine opened this issue 1 year ago • 4 comments
trafficstars

While investigating performance issues in my Android app, I noticed that the ButtonContentTypeConverter was parsing a double without providing a Culture and that is leading to perf issue as described in this blog post.

Description of Change

Update ButtonContentTypeConverter to use CultureInfo.InvariantCulture when performing double.parse(xxx).

jonathanantoine avatar Oct 19 '24 15:10 jonathanantoine

Hey there @jonathanantoine! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

/rebase

jsuarezruiz avatar Oct 23 '24 09:10 jsuarezruiz

While investigating performance issues in my Android app, I noticed that the ButtonContentTypeConverter was parsing a double without providing a Culture and that is leading to perf issue as described in this blog post.

Just curious: What impact do you see in your app?

MartyIX avatar Oct 23 '24 09:10 MartyIX

While investigating performance issues in my Android app, I noticed that the ButtonContentTypeConverter was parsing a double without providing a Culture and that is leading to perf issue as described in this blog post.

Just curious: What impact do you see in your app?

A decrease in performance because it's costly to figure out the current culture the first time on Android. It can be 50 to 100ms on some device.

jonathanantoine avatar Oct 23 '24 20:10 jonathanantoine

/rebase

jsuarezruiz avatar Oct 28 '24 08:10 jsuarezruiz