Skip to content

Reduce monitor polling and configuration database overhead - #155

Open
shedowe19 wants to merge 1 commit into
developfrom
codex/measured-performance-optimizations
Open

shedowe19 wants to merge 1 commit into
developfrom
codex/measured-performance-optimizations

Conversation

@shedowe19

@shedowe19 shedowe19 commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Proxy-host tables continued polling monitor statuses when both status columns were hidden, every persisted monitor check loaded up to 100 history IDs, and Nginx configuration generation fetched singleton relations separately for every host.

This change:

  • Pauses status polling when both Monitor and Latency columns are hidden, forwards cancellation to the transport, refreshes immediately on reveal, and preserves other active consumers and backend monitoring.
  • Uses one boundary ID and one deletion for history retention, inside the result transaction. The 100-entry/30-day bounds, stale-result protection, alert behavior, and rollback remain covered.
  • Joins only singleton Nginx relations and fetches collections separately, reducing protected-host graph reads from 6 to 4 without collection multiplication or stale batch prefetching.

Measurements

Warmed synthetic fixtures, three alternating samples per case, recorded after the test/build workloads finished:

Workload Before After
Both columns hidden, 90 seconds of virtual time 4 status GETs 0
1,000 monitor persistence operations, including transaction control 7,000 statements 6,000
1,000 monitor persistence operations, median 536.027 ms 467.973 ms
1,000 Nginx hosts, data statements (transaction controls unchanged) 8,000 6,000
1,000 Nginx hosts, SQLite median total 2,656.80 ms 2,605.19 ms
1,000 Nginx hosts, PGlite median total 5,862.13 ms 5,593.92 ms

All 36 Nginx measurement runs passed actual ShieldPM Nginx 1.31.6 syntax validation. Baseline/current configuration hashes matched for every pair. The complete 10/100/1,000 matrices, raw samples, reproduction commands, and interpretation limits are in the internal report.

Validation

  • Node 26.12.0 with unchanged frozen dependency manifests/lockfiles.
  • Backend: 2,176 passed, 7 configured skips; backend TypeScript passed.
  • Frontend: 943 passed; locales, production build/TypeScript, and compressed bundle budget passed.
  • Backend/frontend Biome passed; TScanner workspace and staged scans passed with no new errors or advisory findings.
  • Independent implementation and benchmark-methodology review found no actionable issues.
  • Internal module/wiki documentation and project context updated.

Measurements are local synthetic workloads, not production throughput claims. Monitor timings exclude network probes. PostgreSQL coverage uses single-connection PGlite, with no live MySQL measurement; locking was measured without contention. Existing live-service/container CI checks remain applicable.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T17:19:17.721923Z e364152 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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