Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
cache loadUser if not exists #27068
This PR caches a non existing user in the DB, killing ~30 queries on every request when an ldap user logs in.
user_ldap (type authentication) depends upon the AvatarManager, which in turn triggers a setupfs(), which in turn pulls in all apps of type 'filesystem' (activity, dav, files, files_sharing, files_trashbin and files_versions. Probably objectstore, search_elastic / search_lucene and whatever app has type filesystem).
Loading an app causes the I10n to be initialized whenever \OC::$server->getL10N() is used in the app.php directly or if it is a dependency of the other classes used when enabling the app.
L10N tries to get the user object which somewhere calls userExists() ... aaaand that is why for every request we do ~30
There are probably other things doing a userExists check, but L10N is the most frequent.
@DeepDiver1975 I don't know if the user backend loading order may be the cause for the mixed UI languages issue you were investigating. It sure smells like it.
Yes, this only removes a symptom of the mess described above. Maybe this is no longer an issue whan the user table has been merged. I don't know. Looking at the app loading made my head hurt because we are constantly calling \OC_App::registerAutoloading() for apps that don't even match the type