Skip to content
Snippets Groups Projects
Unverified Commit d8637c62 authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

Reduce the getAppPath and autoloader calls


The getAppPath will always return the same data for the same appId. It
is actually already cached. However we do some cleanup of the appId
(again). Same for the autoloading it is actually already checked.

This just removes the unneeded calls. Which can add up if you have a lot
of incomming shares.

Signed-off-by: default avatarRoeland Jago Douma <roeland@famdouma.nl>
parent a5fa9604
No related branches found
No related tags found
No related merge requests found
......@@ -118,9 +118,12 @@ class OC_App {
// Add each apps' folder as allowed class path
foreach ($apps as $app) {
$path = self::getAppPath($app);
if ($path !== false) {
self::registerAutoloading($app, $path);
// If the app is already loaded then autoloading it makes no sense
if (!isset(self::$loadedApps[$app])) {
$path = self::getAppPath($app);
if ($path !== false) {
self::registerAutoloading($app, $path);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment