Skip to content

feat(launchpad): stats blocks follow the filter bus, slow refetches are logged, drill-down performance measured - #1493

Merged
rubenvdlinde merged 3 commits into
developmentfrom
quality/livepass-launchpad-drilldown-perf
Nov 21, 2026
Merged

rubenvdlinde merged 3 commits into
developmentfrom
quality/livepass-launchpad-drilldown-perf

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What this does

Drill-down tasks 10 and 35 measured on a representative local stack (Ruben, 21 Nov): 50,000 objects in register cwf-perf (12 provinces, 342 gemeenten, 3,073 wijken), OpenRegister 2.2.0-dev, PostgreSQL 16.

  • Stats blocks now consume the filter bus like charts do; both hosts time each refetch and log a warning when a widget takes over 200 ms to show its data after a filter change. Vitest tests fail without this.
  • tests/e2e/cross-widget-filter-performance.spec.ts measures the gemeente-then-wijk drill-down and the bus memory cost (seed in tests/e2e/support/cwfPerfSeed.ts; the spec skips when the data set is missing).
  • Results (median / p95): click to consuming widgets re-rendered with bar-list charts 176 / 244 ms; OpenRegister query 113 / 125 ms; non-consumers make no request; heap cost of 110 widgets on the bus about 330 KB. With ApexCharts bars the redraw takes 9.8 / 13.6 s, all of it ApexCharts measuring SVG text in nextcloud-vue, so its test stays red as the record of that miss.
  • Task texts now say "a representative local stack (volume recorded)"; task 35 is ticked (warning in place, numbers recorded), task 10 stays open on the ApexCharts redraw. Results are documented as a comment in src/views/Views.vue.

Verification

  • composer check:strict on development 4781688 plus this branch: PHPUnit 5524 tests green; no PHP files changed; phpstan clean; psalm cannot run here (PHP 8.3.6).
  • npm run lint: 0 errors; build green. Vitest for the touched renderers green.

AI assistance: prepared with Claude Code (claude-opus-5-5); measured on a live instance.

…re logged

REQ-CWF-002 asks every widget whose `consumes` names a published
dimension to refetch with it. Only ChartHost read the bus: a stats block
that declared `consumes` kept counting the whole register. StatsBlockHost
now adds the bus's clauses for its consumed dimensions to its data source
filter, and stays off the bus with a warning when a consumed dimension is
outside the dashboard's hierarchies, as ChartHost does. A clause on a
dimension it does not consume leaves its filter as it was.

Task 35 asks for a warning when one widget's re-render after a filter
change takes over 200 ms. Both hosts now time the span from the bus
changing their filter to the library widget's next `data` event, record
it as a `launchpad:filter-refetch` performance measure, and log
"[launchpad] widget <id> took <n> ms to show its data after a filter
change (over 200 ms): <filter>" when it is over. The bus unwrap both
hosts need moved into widgetBusConsumption.js (`filterBusOf`).

Assisted-by: ClaudeCode:claude-opus-5-5
Tasks 10 and 35 of drill-down-cross-widget-filter need the 300 ms bound,
the query time and the bus's memory cost measured on a populated
OpenRegister. cwfPerfSeed.ts generates a fixed data set along the Dutch
administrative hierarchy (12 provinces, 342 gemeenten, about 3,000 wijken,
50,000 objects) and seeds it through OpenRegister's bulk save;
cwfPerfSeed.cli.mts runs the seed or removes it.

cross-widget-filter-performance.spec.ts builds a dashboard with a
gemeente chart that publishes, a wijk chart and a status chart that
consume, and a chart that consumes nothing, then clicks a gemeente and its
largest wijk twelve times. It measures, in the page's clock, the press to
each consumer showing the filtered data, the OpenRegister time of every
filtered request, and checks the non-consumer neither asks nor redraws.
It runs once with `bar-list` charts and once with ApexCharts bars, so the
drawing cost is told apart from the bus and the query. A third test
compares the heap of 110 charts on and off the bus. Every number is
attached as JSON. The tests skip without the data set.

Dashboards do not store hierarchy descriptors yet, so the spec adds the
hierarchy to the dashboard read.

Assisted-by: ClaudeCode:claude-opus-5-5
…10 open

Both tasks asked for profiling on a production OpenRegister cluster; they
now name a representative local stack with its volume recorded, and carry
the numbers of the performance spec (50,000 objects, 12 clicks per chart
kind). Only consumers refetch, OpenRegister answers the drill-down queries
in 108-153 ms median, and the bus costs 0.32 MB of heap for 110 charts.
The 300 ms bound holds with `bar-list` charts (p95 244 ms) and is missed
with ApexCharts bars (median 9.8 s), almost all of it the chart redraw,
so Task 10 stays open on that. Task 35 is done: the numbers are recorded
and a re-render over 200 ms logs a warning. The results are a comment on
`openFilterSession()` in Views.vue, the dashboard view (there is no
Dashboard.vue).

Assisted-by: ClaudeCode:claude-opus-5-5
@rubenvdlinde
rubenvdlinde merged commit cf36d43 into development Nov 21, 2026
7 of 8 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/launchpad @ e8bdde0

Check PHP Vue Security License Tests
lint ✅
phpcs ❌
phpmd ❌
psalm ❌
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
format ❌
check-schema-l10n ❌
composer ❌ ✅ 127/127
npm ✅ ✅ 647/647
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit ❌
Newman ❌
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ❌

Quality workflow — 2026-11-21 18:33 UTC

Download the full PDF report from the workflow artifacts.

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