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

In API requests if the current user is already authenticated, do not authenticate the user again #7643

Merged
merged 1 commit into from Apr 10, 2015

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Apr 8, 2015

This improves performance. For example reloadAccess() can otherwise cause fetching all sites the user has permission to over and over again. Even in a simple report we often do reload the same access > 5 times. Sometimes much more.

It should not be done in reloadAccess() itself since there are actually reasons when you want to reload the access if though the current user is already authenticated. For example when adding a new site: https://github.com/piwik/piwik/blob/master/plugins/SitesManager/API.php#L564

… user again

This will improve performance. For example `reloadAccess` can otherwise cause fetching all sites the user has permission to over and over again.
@tsteur tsteur added c: Performance For when we could improve the performance / speed of Matomo. Needs Review PRs that need a code review labels Apr 8, 2015
@tsteur tsteur added this to the Piwik 2.13.0 milestone Apr 8, 2015
mattab pushed a commit that referenced this pull request Apr 10, 2015
In API requests if the current user is already authenticated, do not authenticate the user again
@mattab mattab merged commit 3ab444e into master Apr 10, 2015
@mnapoli mnapoli deleted the avoid_unnecessary_access_reload branch April 13, 2015 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Performance For when we could improve the performance / speed of Matomo. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants