Skip to content

finding: the shipped runtime publish gate already costs linearly in tenant object count — 506 ms per flow publish at 420 objects, before any widening #9613

Description

@os-support-ai

Recording a measured fact that has lived only inside a card comment (#4716 comment 5309105113, measured on origin/main @ 66beee0f3 by a throwaway harness) so it stops being invisible to every perf listing. Filed unassigned during the 2026-08-18 adjudication of that card (maintainer directed the split package: 「简化开发」→「同意」).

The measurement

Today's shipped gate — before anything from the P2 widening lands — costs 33.4 ms at 21 objects → 506 ms at 420 objects per flow publish, linear in the tenant's object count. The companion per-rule profile shows the bill concentrates in at-gate rules being handed the whole stack: validateStackExpressions ≈ 70% of the option-(a) bill, validateReferenceIntegrity ≈ 11% — both already on the runtime-publish surface today.

Why it may matter

Flow publish is a user-facing interactive action (Studio designer). Half a second of gate latency at 420 objects is already perceptible, and it grows with exactly the number that grows as a tenant succeeds. Likely landing shape (for triage, not a decision): scope what the two hot rules are handed (they need reachable references, not the whole stack) or memoize the stack view across a publish — the split-out snapshot card records the same 86%-at-gate concentration and the two fixes may be one fix.

Re-check command: the harness methodology is described in the source comment; the cheap premise check is grep -n "runtime-publish" packages/lint/src/authoring-rules.ts plus timing one saveMetaItem flow publish against a seeded 400-object stack.

  • Unassigned, observation class, awaiting first-touch grading (repo-wide round).

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions