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

fix: Correct syntax error in Auth Guard for substantial performance gains #451

Conversation

ComputerTinker
Copy link
Contributor

Changes

Current code is finding session, setting credential and pushing state with every call to getCredential(). Fix replaces missing NOT operator so code correctly uses cached credential if available.

Testing

We have several pages in our app which return collections of tens of thousands of Eloquent records. After installing laravel-auth0 we noticed the performance of these pages degrade by 2x-6x depending on the records involved, sometimes resulting in timeout errors. With the fix in place, performance has returned to normal.

Contributor Checklist

…for substantial performance gains

Signed-off-by: Russ <ComputerTinker@users.noreply.github.com>
@ComputerTinker ComputerTinker requested a review from a team as a code owner April 4, 2024 13:03
@evansims evansims added Scope: Bug Confirmed report of unexpected problems or unintended behavior. Roadmap: Next Minor labels Apr 4, 2024
@evansims evansims self-assigned this Apr 4, 2024
@ComputerTinker
Copy link
Contributor Author

Sorry. Fix needs fixing. Let me see if I can noodle it out...

@evansims
Copy link
Member

evansims commented Apr 4, 2024

No worries, @ComputerTinker; I appreciate you putting the efforts forward there. Let me know if you need any support in figuring things out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Roadmap: Next Minor Scope: Bug Confirmed report of unexpected problems or unintended behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants