Skip to content

Conversation

@juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Jun 18, 2024

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

@juliusknorr juliusknorr force-pushed the chore/lazy-mount-providers branch 6 times, most recently from f2d0c53 to 9f2cdeb Compare June 18, 2024 14:54
@solracsf solracsf added this to the Nextcloud 30 milestone Jun 18, 2024
@juliusknorr juliusknorr force-pushed the chore/lazy-mount-providers branch from f8d2226 to 854e54a Compare June 18, 2024 21:34
Copy link
Contributor

@come-nc come-nc left a 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.

}

public function clearProviders() {
$this->$this->registerEventEmitted = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$this->$this->registerEventEmitted = false;
$this->registerEventEmitted = false;

I suppose?

@juliusknorr juliusknorr force-pushed the chore/lazy-mount-providers branch from 854e54a to b2755b8 Compare June 21, 2024 07:59
@juliusknorr juliusknorr self-assigned this Jun 24, 2024
This was referenced Jul 30, 2024
@Altahrim Altahrim mentioned this pull request Aug 5, 2024
@juliusknorr juliusknorr modified the milestones: Nextcloud 30, Nextcloud 31 Aug 6, 2024
@skjnldsv skjnldsv marked this pull request as draft November 15, 2024 13:08
@skjnldsv skjnldsv removed the 3. to review Waiting for reviews label Dec 3, 2024
@skjnldsv skjnldsv added the 2. developing Work in progress label Dec 3, 2024
@blizzz blizzz modified the milestones: Nextcloud 31, Nextcloud 32 Jan 29, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 📄 To do (~10 entries)

Development

Successfully merging this pull request may close these issues.

8 participants