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

improve the notification performance #14414

Merged
merged 2 commits into from
Dec 13, 2023

Conversation

ulferts
Copy link
Contributor

@ulferts ulferts commented Dec 13, 2023

This improvements has two parts:

  • Avoid reapplying the visibility check for notifications.
  • Merging the constraints rather than having them in a subselect.

It requires moving the visibility scope of principals as that would otherwise not be applied correctly. But since the Principal's visibility scope does already apply the constraints conditionally, moving does not change the behaviour.

https://community.openproject.org/wp/51622

@ulferts ulferts changed the base branch from dev to release/13.1 December 13, 2023 12:07
@ulferts ulferts force-pushed the fix/improve_notification_performance branch from 77e127d to 661c874 Compare December 13, 2023 12:51
@klaustopher
Copy link
Contributor

It seems to be messing with the onboarding tour. Any idea how those changes interfere?

@ulferts
Copy link
Contributor Author

ulferts commented Dec 13, 2023

The specs got broken before this PR. @klaustopher already issued a PR for fixing those #14417.

Testing the altered statements against production data indicates, that the new statement is roughly an order of magnitude faster than the old one.

This improvements has two parts:
* Avoid reapplying the visibility check for notifications.
* Merging the constraints rather then having them in a subselect.
The visible scope already applies conditional constraints based on permission
@ulferts ulferts force-pushed the fix/improve_notification_performance branch from 661c874 to 8249e0f Compare December 13, 2023 15:46
@ulferts ulferts marked this pull request as ready for review December 13, 2023 15:46
@klaustopher klaustopher merged commit a657e0f into release/13.1 Dec 13, 2023
9 checks passed
@klaustopher klaustopher deleted the fix/improve_notification_performance branch December 13, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants