Skip to content

Optimize badge check #136

Open
nickfreese wants to merge 2 commits intomasterfrom
feature/optimize-badge-check
Open

Optimize badge check #136
nickfreese wants to merge 2 commits intomasterfrom
feature/optimize-badge-check

Conversation

@nickfreese
Copy link
Contributor

Optimize badge check by loading all ledger entries for game term at the beginning and replace sql for each badge check with php.

Before badge check would make more queries (and slower) for players who played the least, which are the majority. This reverses that, so now the number of queries are reduced for everyone, but may be a little (variation under 100ms) slower for our biggest players.

@ejk, I will be running through a bunch of badge types while you're out probably not worth reviewing until then.

…he beginning and replace sql for each badge check with php
@nickfreese nickfreese requested a review from ejk June 26, 2025 20:23
@nickfreese
Copy link
Contributor Author

@ejk I've tested this locally with all the changed badge types. This is good to review now. I've left the old code commented out for now to make it easier to compare logic, but can remove before rolling it out.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments