chore: Add event to register mount providers more lazy#45953
Draft
juliusknorr wants to merge 1 commit intomasterfrom
Draft
chore: Add event to register mount providers more lazy#45953juliusknorr wants to merge 1 commit intomasterfrom
juliusknorr wants to merge 1 commit intomasterfrom
Conversation
24 tasks
1658ed3 to
6f3bc93
Compare
f2d0c53 to
9f2cdeb
Compare
kesselb
reviewed
Jun 18, 2024
f8d2226 to
854e54a
Compare
come-nc
reviewed
Jun 20, 2024
Contributor
come-nc
left a comment
There was a problem hiding this comment.
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.
| } | ||
|
|
||
| public function clearProviders() { | ||
| $this->$this->registerEventEmitted = false; |
Contributor
There was a problem hiding this comment.
Suggested change
| $this->$this->registerEventEmitted = false; | |
| $this->registerEventEmitted = false; |
I suppose?
Signed-off-by: Julius Härtl <jus@bitgrid.net>
854e54a to
b2755b8
Compare
icewind1991
approved these changes
Jun 21, 2024
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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