Skip to content

Performance: remove subscriber admin query fan-out - #1324

Merged
danieliser merged 1 commit into
developfrom
agent/admin-subscriber-table-perf
Aug 13, 2026
Merged

danieliser merged 1 commit into
developfrom
agent/admin-subscriber-table-perf

Conversation

@danieliser

@danieliser danieliser commented Aug 10, 2026 •

Copy link
Copy Markdown
Member

Scope

Standalone performance change against develop for the wp-admin subscriber table.

Summary

  • Load the current subscriber page distinct popup IDs and titles with one narrow query.
  • Resolve every ID through the public pum_get_popup_id filter before batching, then map the filtered titles back to the stored subscriber IDs.
  • Reuse that mapping while rendering the Popup column instead of hydrating a popup model and metadata per row.
  • Preserve the legacy direct-column fallback for callers that invoke the column renderer without preparing the table first.
  • Add cold-cache query-budget and popup-ID filter compatibility regression coverage.

Measured impact

Benchmark: 20 subscriber rows referencing 20 distinct published popups, with each popup object cache cleared before a complete prepare_items() plus Popup-column render.

Metric Baseline Optimized Change
SQL queries 42 3 -92.9%
Execution time 3.180 ms 0.782 ms -75.4%
Titles rendered 20/20 20/20 unchanged

Ablation: preloading full WP_Post objects reduced the path to four queries and 0.811 ms. The final two-column read avoids the extra split query and full post hydration because the table only consumes ID and post_title. Preserving the popup-ID filter adds no SQL queries.

Compatibility and correctness

  • Filtered popup IDs retain the legacy behavior: the resolved popup supplies the title while the subscriber stored popup ID remains in the edit link and label.
  • Multiple stored IDs resolving to the same popup are deduplicated in the database query.
  • Invalid or missing resolved popups continue to render N/A.

Validation

  • Full GitHub Tests matrix and CI - Code Quality: green on the final SHA.
  • Admin subscriber table suite: 2 tests, 24 assertions.
  • Popup-ID filter regression verifies the filtered title, absence of the original title, and preservation of the stored-ID edit link.
  • Changed production-file PHPStan and PHPCS: passed.
  • PHP syntax and git diff --check: passed.
  • Prior Codex popup-ID filter finding remains fixed; no unresolved review threads.
  • Original two-commit scoped range replayed unchanged onto current develop (git range-diff exact match).

@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@danieliser, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 4 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8c3db30a-e0a1-41e2-8601-83aa96a57afd

📥 Commits

Reviewing files that changed from the base of the PR and between 3af804e and 05488b5.

📒 Files selected for processing (2)
  • classes/Admin/Subscribers/Table.php
  • tests/php/tests/PUM_Admin_Subscribers_Table_Test.php

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@danieliser
danieliser force-pushed the agent/cta-lookup-query-perf branch from c673b83 to 73e1637 Compare August 10, 2026 18:40
@danieliser
danieliser force-pushed the agent/admin-subscriber-table-perf branch from fe59e7f to 505180a Compare August 10, 2026 18:40
@danieliser
danieliser force-pushed the agent/cta-lookup-query-perf branch from 73e1637 to f78e64f Compare August 10, 2026 18:56
@danieliser
danieliser force-pushed the agent/admin-subscriber-table-perf branch from 505180a to 7a06417 Compare August 10, 2026 18:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7a0641745c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread classes/Admin/Subscribers/Table.php Outdated
@danieliser
danieliser force-pushed the agent/cta-lookup-query-perf branch from f78e64f to c9e556d Compare August 10, 2026 19:06
@danieliser
danieliser force-pushed the agent/admin-subscriber-table-perf branch from 7a06417 to 01a94b5 Compare August 10, 2026 19:06
@danieliser
danieliser force-pushed the agent/cta-lookup-query-perf branch from c9e556d to 466d6a9 Compare August 12, 2026 07:38
@danieliser
danieliser force-pushed the agent/admin-subscriber-table-perf branch from 27b0684 to afcc7f3 Compare August 12, 2026 07:39
@danieliser
danieliser force-pushed the agent/cta-lookup-query-perf branch from 466d6a9 to 931fa93 Compare August 13, 2026 01:55
@danieliser
danieliser force-pushed the agent/admin-subscriber-table-perf branch from afcc7f3 to c833635 Compare August 13, 2026 01:55
@danieliser
danieliser changed the base branch from agent/cta-lookup-query-perf to develop August 13, 2026 01:55
@danieliser
danieliser force-pushed the agent/admin-subscriber-table-perf branch from d6a714a to c833635 Compare August 13, 2026 01:58
@danieliser

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: c83363574d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danieliser
danieliser force-pushed the agent/admin-subscriber-table-perf branch from f83fef4 to 29cb7bd Compare August 13, 2026 02:38
@danieliser

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 29cb7bdfc1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danieliser
danieliser force-pushed the agent/admin-subscriber-table-perf branch from e46321c to 05488b5 Compare August 13, 2026 12:41
@danieliser

Copy link
Copy Markdown
Member Author

@codex review

@danieliser

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 05488b5a9f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danieliser
danieliser merged commit a1150ed into develop Aug 13, 2026
27 checks passed
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