microsoft / appcenter-sdk-dotnet

Development repository for the App Center SDK for .NET platforms, including Xamarin
Other
311 stars 141 forks source link

Big startup performance penalty since .NET6 due to unnecessarily compiled RegEx #1730

Closed tipa closed 1 year ago

tipa commented 1 year ago

Description

Please describe the issue you are facing using the SDK. The compiled Regex here is significantly slowing down startup performance since .NET6/.NET7. This has been discussed in detail here. Before .NET6/7 (in "old" Xamarin) the RegexOptions.Compiled flag was ignored so there was no negative performance impact.

The RegEx should not be compiled as it only seems to be executed a single time.

Details

  1. What is your app platform (Xamarin.Android or Xamarin.iOS or UWP)?
    • .NET7 for Android
  2. If using Xamarin.Forms or if using portable/shared code to call our SDK APIs, are you using shared project, PCL code or .NET standard code for the application? Which .NET standard version or which PCL profile?
    • e.g. .NET7
  3. Which SDK version are you using?
    • e.g. 5.0.1
MikhailSuendukov commented 1 year ago

Hello @tipa and thank you for contacting us, I have started the investigation and will be back soon with the results.

MikhailSuendukov commented 1 year ago

@tipa your remark makes sense to me. I created a task on our dashboard for implementing such parameter.

snakefoot commented 1 year ago

Resolved by AppCenter ver 5.0.2 ?

See also: https://github.com/microsoft/appcenter-sdk-dotnet/blob/develop/CHANGELOG.md

MikhailSuendukov commented 1 year ago

Yes, this penalty is fixed in the latest release, please contact us if you have any other questions and feel free to reopen this issue.