summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-11-07 17:51:41 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2020-11-07 17:51:41 +0100
commit889bb44b425417c3a63a269b060a7bc7e112bc38 (patch)
treea81c2ebb8376167f0ebc3a408a964e6fe4a89fc9
parenta5fa9604babdab101357016066ed72b4fcab1d21 (diff)
downloadnextcloud-server-889bb44b425417c3a63a269b060a7bc7e112bc38.tar.gz
nextcloud-server-889bb44b425417c3a63a269b060a7bc7e112bc38.zip
First query the server container
When the servercontainer wants to obtain something changes are very high this is something from the server container. Esp on setups with a lot of shares this can change quite a bit as it avoid a needless check on the strpos OCA\\ etc. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r--lib/private/ServerContainer.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/ServerContainer.php b/lib/private/ServerContainer.php
index 72275ac1205..50592f36ada 100644
--- a/lib/private/ServerContainer.php
+++ b/lib/private/ServerContainer.php
@@ -133,6 +133,12 @@ class ServerContainer extends SimpleContainer {
public function query(string $name, bool $autoload = true) {
$name = $this->sanitizeName($name);
+ try {
+ return parent::query($name, false);
+ } catch (QueryException $e) {
+ // Continue with general autoloading then
+ }
+
// In case the service starts with OCA\ we try to find the service in
// the apps container first.
if (($appContainer = $this->getAppContainerForService($name)) !== null) {