Repository navigation
perf(users): password hashing off the event loop; cached admin user summary - #844
Merged
Merged
Conversation
…summary; lighter admin users page Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
…nce per transaction; lazy cache Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
…explicit publishes from admin writes Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
… publishes; login bookkeeping keeps the summary cache Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
Deploying simple-module-python with
|
| Latest commit: |
c241f3c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a26540bb.simple-module-python.pages.dev |
| Branch Preview URL: | https://fix-s15-perf-users.simple-module-python.pages.dev |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Performance fix for the users module (local performance review, 2026-11-05).
Password hashing off the event loop
users.core.password_hashing) overridescreate,_updateandreset_passwordto offload only the hash/verify calls, using one sharedPASSWORD_HELPER.SM_TEST_REAL_PASSWORD_HASHING=1; details indocs/perf/2026-11-05-users.md):Admin users page
/admin/users/page, including on each pagination click, are cached per worker for 30 s.is_active,is_verified,invited_at), a role or a role membership commits. Logins, lockout counters, password rehashes and session revocations do not drop it.users.admin_summaryafter commit so other workers refresh: create (including role-less create), delete, invite, disable, enable, mark verified and set roles. The TTL is the floor.Fixed:
on_commitcallbacks queued before a fastapi-users adapter commit (db_adapter) used to be discarded by request finalization. They now run after that commit.Pipeline:
file_storage.aggregates) plus explicit publishes (as in permissions and feature_flags), about 80 fewer lines.Local CI:
make lint✓ ·make test-py(8 workers) 7915 passed ✓ ·make test-js✓.https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4