Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Investigate] Investigate performance of broker authentication scenarios and Identify areas for improvment #1796

Closed
trwalke opened this issue Apr 30, 2020 · 6 comments

Comments

@trwalke
Copy link
Member

trwalke commented Apr 30, 2020

Which Version of MSAL are you using ?
Latest

Platform
xamarin android, xamarin iOS

What authentication flow has the issue?
all brokered authentication flows

We need to investigate the performance of the authentication scenarios on Android and iOS to determine how long each section of the authentication flow takes. We can use this data to look for areas of opportunity to improve performance for the scenarios.

We should also compare the performance of ADAL and MSAL to get a baseline of how MSAL compares to ADAL today.

@bgavrilMS
Copy link
Member

When acquiring a token silently, MSAL goes directly to the broker. However, MSAL should first try to see if there is an access token in its cache first. MSAL's local cache should be significantly faster than talking to the broker.

We should implement / fix #1820 before measuring perf.

@bgavrilMS bgavrilMS modified the milestones: 4.15, Ongoing Customer Help May 27, 2020
@bgavrilMS bgavrilMS added bug and removed Investigate labels May 27, 2020
@bgavrilMS bgavrilMS modified the milestones: Ongoing Customer Help, 4.15 May 27, 2020
@bgavrilMS bgavrilMS self-assigned this Jun 5, 2020
@bgavrilMS
Copy link
Member

Added measuring logic, now waiting for #1820 to be fixed as it should improve perf ...

@bgavrilMS bgavrilMS modified the milestones: 4.15, 4.16.0 Jun 11, 2020
@bgavrilMS bgavrilMS removed their assignment Jun 24, 2020
@bgavrilMS bgavrilMS modified the milestones: 4.16.0, 4.17.0 Jul 8, 2020
@henrik-me
Copy link
Contributor

planning: Next step is to find next improvements

@neha-bhargava
Copy link
Contributor

With same scope as used in acquire token interactive with broker and with force refresh true time taken to acquire token silent:

AcquireTokenSilentViaBrokerAsync in 909 ms
ValidateBrokerRedirectURI in 8 ms
InitiateBrokerHandshakeAsync in 383 ms
IsBrokerInstalledAndInvokable in 10 ms
VerifyAuthenticator in 9 ms
IsBrokerInstalledAndInvokable in 10 ms
VerifyAuthenticator in 8 ms
GetAccountsAsync in 861 ms
InitiateBrokerHandshakeAsync in 364 ms
IsBrokerInstalledAndInvokable in 15 ms
VerifyAuthenticator in 13 ms
IsBrokerInstalledAndInvokable in 18 ms
VerifyAuthenticator in 15 ms

Observation: InitiateBrokerHandshakeAsync is consuming a lot of time.

@bgavrilMS
Copy link
Member

How long does this take for MSAL.Android? I doubt we can go faster than them :)

@bgavrilMS
Copy link
Member

Won't fix.

@bgavrilMS bgavrilMS closed this as not planned Won't fix, can't repro, duplicate, stale Dec 22, 2022
@pmaytak pmaytak removed this from the Future Minor Version milestone Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants