-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Add event to register mount providers more lazy #45953
base: master
Are you sure you want to change the base?
Conversation
1658ed3
to
6f3bc93
Compare
f2d0c53
to
9f2cdeb
Compare
f8d2226
to
854e54a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An other solution would be to register provider classes and let the mountprovidercollection get them from DI when needed?
Only problem is if an app want to register instances with parameters in the constructor, or even several instances of the same class with different config. In this situation your solution works better.
@@ -230,12 +216,17 @@ public function getRootMounts(): array { | |||
} | |||
|
|||
public function clearProviders() { | |||
$this->$this->registerEventEmitted = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->$this->registerEventEmitted = false; | |
$this->registerEventEmitted = false; |
I suppose?
Signed-off-by: Julius Härtl <jus@bitgrid.net>
854e54a
to
b2755b8
Compare
Mount provider registration currently requires to obtain the MountProviderCollection and create instances of apps mount providers, which might pull in more heavy dependencies. While this is not a problem in files_sharing, other apps like circles or collectives have a larger tree of dependencies that the mount provider class is pulling in.
We don't need the mount providers always available so we can save those DI setup times for all requests that don't access the mount provider list through accessing the storage.
Checklist