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

OAuth logins taking ~20s #1096

markzegarelli opened this Issue Nov 8, 2016 · 1 comment


None yet
2 participants

markzegarelli commented Nov 8, 2016

Expected behaviour

Login should be expedited

Actual behaviour

On login, via a New Relic dashboard, I see that the /oauth.callback transaction is taking anywhere from 15-30s.

Logging shows me that roughly 85% of that time is taken up by Spyc::loadWithSource. I can see that this is being called hundreds of times.

I think the issue is caused by the getOauthID function in statamic/core/Data/Users/User.php parsing every line in local/cache/oauth_ids.yaml until it finds the match.

FYI, this is the custom OAuth solution provided by you, prior to releasing the official version.

Steps to reproduce

  1. Seed a site with a few hundred users and ids in oauth_ids.yaml.
  2. Log in to the site via OAuth.

Server configuration

Operating system:
Web server:
PHP version:
Statamic version:
Updated from an older Statamic or fresh install:

List of installed addons:


This comment has been minimized.


jasonvarga commented Nov 9, 2016

Fixed for next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment