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

[stable6] Perf improvements for stable-6 for 26 branch #3445

Merged
merged 3 commits into from
Apr 24, 2024

Conversation

come-nc
Copy link
Contributor

@come-nc come-nc commented Apr 23, 2024

Trying to bring the number of DB requests for polls listing down.
So far got down from 52 to 30 for 4 polls with no votes.

@come-nc come-nc self-assigned this Apr 23, 2024
lib/Db/UserMapper.php Outdated Show resolved Hide resolved
lib/Model/Acl.php Outdated Show resolved Hide resolved
lib/Model/Acl.php Show resolved Hide resolved
@artonge artonge force-pushed the fix/stable-6-for-26-perf-improvements branch from 07d8023 to 68439a5 Compare April 24, 2024 10:11
@artonge artonge marked this pull request as ready for review April 24, 2024 10:18
Saves a few DB requests

Signed-off-by: Côme Chilliet <[email protected]>
Avoid a DB request for each poll, instead use the data we just got from
 the full list.

Signed-off-by: Côme Chilliet <[email protected]>
Not pretty but avoids a few DB calls. Ideally we should not do these
 requests at all, I do not really understand this share part in Acl.

Signed-off-by: Côme Chilliet <[email protected]>
@artonge artonge force-pushed the fix/stable-6-for-26-perf-improvements branch from 549f6e0 to 8bf95e8 Compare April 24, 2024 10:26
@ArtificialOwl ArtificialOwl merged commit 3097e50 into stable-6-for-26 Apr 24, 2024
15 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix/stable-6-for-26-perf-improvements branch April 24, 2024 12:21
@artonge artonge changed the title Perf improvements for stable-6 for 26 branch [stable6] Perf improvements for stable-6 for 26 branch Apr 24, 2024
@artonge
Copy link
Contributor

artonge commented May 7, 2024

/backport to master

@dartcafe
Copy link
Collaborator

dartcafe commented May 7, 2024

/backport to master

@artonge Never ever!!!!

@come-nc
Copy link
Contributor Author

come-nc commented May 13, 2024

/backport to master

@artonge Never ever!!!!

Is the code base that different? We should make sure master does not suffer from the perf problems this PR fixed for 6, otherwise upgrading from 6 to 7 would result in performance degradation. I did not look into the details, maybe those extra DB requests are already gone in 7.

@dartcafe
Copy link
Collaborator

  1. Yes, the code differs a lot
  2. Most of the optimizations here come from the master branch

Existing problems have to be solved another way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants