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

perf(app-framework): Make app middleware registration even lazier #36298

Merged

Conversation

ChristophWurst
Copy link
Member

@ChristophWurst ChristophWurst commented Jan 23, 2023

Summary

Before this patch, app middlewares were registered on the DI container of each app loaded in a Nextcloud process. With the patch the registration is moved to a later point. Only middlewares of the created dispatcher will be loaded.

This allows me to work on a new middleware feature: #36310

Benchmarks

Blackfire and wall time measurements show no improvements. After all we are just moving around class names. That stuff is fast.

Checklist

Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@nickvergessen
Copy link
Member

I was scared this would break global middlewares, turns out

This allows me to work on a new middleware feature: #36310

:D

nickvergessen added a commit to nextcloud/spreed that referenced this pull request Jan 25, 2023
Signed-off-by: Joas Schilling <[email protected]>
@nickvergessen
Copy link
Member

Since talk is using middleware, I triggered a CI run at nextcloud/spreed#8598 so we can see it in action

@nickvergessen
Copy link
Member

CS is failing

@ChristophWurst ChristophWurst force-pushed the perf/app-framework/lazy-middleware-registration branch from f2f4e6e to 4033249 Compare January 25, 2023 08:25
Before this patch, app middlewares were registered on the dispatcher for
every app loaded in a Nextcloud process. With the patch, only
middlewares belonging to the same app of a dispatcher instance are
loaded.

Signed-off-by: Christoph Wurst <[email protected]>
@ChristophWurst ChristophWurst force-pushed the perf/app-framework/lazy-middleware-registration branch from 4033249 to 907ff68 Compare January 25, 2023 08:27
@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jan 25, 2023
@nickvergessen
Copy link
Member

Integration tests of talk passed as well https://drone.nextcloud.com/nextcloud/spreed/11370
So good to go 👍🏼

@ChristophWurst
Copy link
Member Author

Summary job is stuck, but

you can merge

@skjnldsv, circa 2023-01-25T16:35:32Z

@ChristophWurst ChristophWurst merged commit b58d4f7 into master Jan 25, 2023
@ChristophWurst ChristophWurst deleted the perf/app-framework/lazy-middleware-registration branch January 25, 2023 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish performance 🚀
Projects
Development

Successfully merging this pull request may close these issues.

4 participants