mercredi 13 janvier 2016

Auth::user()->username very slow

I am having a werid issue. My Laravel 5 application is very slow, it take 1-3 seconds to completely load, that is something that is not tolerable.

After hours of debugging, I found out that the issue is Auth::user(), more specifically when you try to access something like Auth::user()->username.

What I noticed: Auth::user()->id is blazing fast, while Auth::user()->username takes 1-3 seconds. It does also not to appear to have something todo with the mySQL server, as the exact same queries are being executed, no matter if I use ->id or ->username.

Any idea why this is happening?

Thanks!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire