furaiev / amazon-cognito-identity-dart-2

Unofficial Amazon Cognito Identity Provider Dart SDK, to easily add user sign-up and sign-in to your mobile and web apps with AWS.
MIT License
187 stars 114 forks source link

Removed `getLargeAValue` call on `AuthenticationHelper` initialization #101

Closed fatbeard2 closed 3 years ago

fatbeard2 commented 3 years ago

Calculated value is not used in every authentication flow, hence there is no need to calculate it for every flow that wants to use AuthenticationHelper

Calculation was causing a significant lag in the UI, blocking the main thread for about 3 seconds. Probably, there's an issue in DDC compiler that causes it. When compiled using dart2js lag was about 700ms.

DDC: image

dart2js: image

furaiev commented 3 years ago

@fatbeard2 Thank you for your contribution. Changes are available as of 0.1.20.