@@ -85,7 +85,8 @@ class SetupManager {
8585 private bool $ listeningForProviders ;
8686 private array $ fullSetupRequired = [];
8787 private bool $ setupBuiltinWrappersDone = false ;
88- private bool $ forceFullSetup = false ;
88+ private bool $ forceFullSetup ;
89+ private bool $ optimizeAuthoritativeProviders ;
8990 private const SETUP_WITH_CHILDREN = 1 ;
9091 private const SETUP_WITHOUT_CHILDREN = 0 ;
9192
@@ -108,6 +109,7 @@ public function __construct(
108109 $ this ->cache = $ cacheFactory ->createDistributed ('setupmanager:: ' );
109110 $ this ->listeningForProviders = false ;
110111 $ this ->forceFullSetup = $ this ->config ->getSystemValueBool ('debug.force-full-fs-setup ' );
112+ $ this ->optimizeAuthoritativeProviders = $ this ->config ->getSystemValueBool ('debug.optimize-authoritative-providers ' , true );
111113
112114 $ this ->setupListeners ();
113115 }
@@ -466,8 +468,13 @@ public function setupForPath(string $path, bool $includeChildren = false): void
466468 }
467469
468470 if ($ this ->fullSetupRequired ($ user )) {
469- $ this ->updateNonAuthoritativeProviders ($ user );
470- $ this ->markUserMountsCached ($ user );
471+ if ($ this ->optimizeAuthoritativeProviders ) {
472+ $ this ->updateNonAuthoritativeProviders ($ user );
473+ $ this ->markUserMountsCached ($ user );
474+ } else {
475+ $ this ->setupForUser ($ user );
476+ return ;
477+ }
471478 }
472479
473480 // for the user's home folder, and includes children we need everything always
0 commit comments