Repository navigation
perf(tenants,permissions): single-flight auth cache fills, unknown-subdomain cache, paginated members - #839
Merged
Merged
Conversation
…, single-flight auth cache fills Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
…tries; optimize cleanups Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
… shared fill helper, single member count Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
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. |
…caches # Conflicts: # CHANGELOG.md
Deploying simple-module-python with
|
| Latest commit: |
d687275
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://528b9325.simple-module-python.pages.dev |
| Branch Preview URL: | https://fix-s14-perf-tenants-caches.simple-module-python.pages.dev |
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
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 tenant membership lookups and the members page (local performance review, 2026-11-05).
simple_module_core.singleflightaddsSingleFlight, a per-key lock that is dropped when idle, andfill().fill()is an epoch-checked fill. It caches nothing if an invalidation lands during the read. AfterMAX_FILL_ATTEMPTS(3) it returns the last read uncached, so a request cannot loop.tenants.hosts, keyed by slug orNone.tenants.membershipcarries only user ids.Page/paginate/PaginationBar, ordered by(created_at, id), 25 per page (max 200). The page keeps its current page after a mutation, and the members count is computed once per load.GETcurrent-members now returns{items, total, page, per_page, pages}instead of an array.TenantService.list_members(tenant_id, params)takesPageParamsand returnsPage[Membership].TenantServicetakesinvalidate_hosts=;deps.get_tenant_servicewires it.docs/modules/tenants.md.fill()in a follow-up. Its files are changed by fix(users): CSRF-protect browser auth requests; logout retires the browser session #832.Pipeline:
host:…can no longer be misrouted; one sharedfill()helper in place of three copies; a single member count; and theapi_tokenstest that read the old array.Local CI:
make lint✓ ·make test-py(8 workers) 7890 passed ✓ ·make test-js✓.https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4