Skip to content
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

New IBootstrap registration for resource and room back ends #29563

Closed
Tracked by #12 ...
ChristophWurst opened this issue Nov 5, 2021 · 1 comment · Fixed by #31007
Closed
Tracked by #12 ...

New IBootstrap registration for resource and room back ends #29563

ChristophWurst opened this issue Nov 5, 2021 · 1 comment · Fixed by #31007
Assignees

Comments

@ChristophWurst
Copy link
Member

\OCP\Calendar\Resource\IManager::registerBackend and \OCP\Calendar\Room\IManager::registerBackend use an old style of service registration. You can't use them in \OCA\CalendarResourceManagement\AppInfo\Application::register of an app because you have to fetch the container.

This raises the next problem: the full service and its dependencies have to be built for every single request, despite resource being used in it or not. So this has a small but factual performance penalty on installations that have apps with resource back-ends.

I propose to move the registration to the registration context and fetch the registered backends from the registration context on demand. Then the registration itself becomes lightweight and we don't have to build services that won't be used for the majority of requests.

@miaulalala
Copy link
Contributor

See 2factor_auth providers as an example.

@ChristophWurst ChristophWurst self-assigned this Feb 4, 2022
@ChristophWurst ChristophWurst added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of labels Feb 4, 2022
@ChristophWurst ChristophWurst added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants