mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
feat(producer): default-off router for verified parallel drawElement
Promotes the opt-in HF_DE_PARALLEL_STREAM mechanism (#2056) into the auto-routing decision, gated behind its own default-off flag (HF_DE_PARALLEL_ROUTER). This is the next step from the 2026-07-08 parallel-DE benchmark verdict: par3/single 1.16-1.36x on real-work comps >=2,000 frames, no comp anywhere losing to single-worker. shouldPreferParallelDrawElement mirrors shouldPreferSingleWorkerDrawElement (#2026) but takes priority over it when both are eligible — its higher default threshold (HF_DE_PARALLEL_MIN_FRAMES=2000 vs the inversion's 900) means it only ever picks up the long tail the inversion's own benchmark didn't cover. Fixed at 3 workers (benchmark-validated; not calibration- derived), same shape as the inversion pinning to a fixed 1. resolveParallelRouterRetryPlan mirrors resolveInversionRetryPlan for the self-verify-failure rollback path: falls back to the ordinary (non-DE) parallel-disk path at the pre-router worker count. The caller must clear HF_DE_PARALLEL_STREAM before recomputing useStreamingEncode or the retry would keep resolving to the parallel-streaming shape. New telemetry (de_parallel_router, de_pre_router_workers) tags which render used the router, separate from de_worker_inversion — needed before the planned telemetry soak can segment revert-rate and de_verify_min_db to the parallel cohort specifically; today there's no way to tell those apart from ordinary single-worker DE renders. Verified end-to-end: HF_DE_PARALLEL_ROUTER=true on a 2,381-frame comp resolves to 3 workers with 3 separate drawElement sessions and renders successfully; without the flag, behavior is unchanged (falls through to the existing single-worker inversion, workerCount=1) — no regression to current production routing. 114 orchestrator tests pass (15 new).
This commit is contained in:
@@ -1688,6 +1688,8 @@ function trackRenderMetrics(
|
||||
deClampReason: perf?.drawElement?.clampReason,
|
||||
deWorkerInversion: perf?.drawElement?.workerInversion,
|
||||
dePreInversionWorkers: perf?.drawElement?.preInversionWorkers,
|
||||
deParallelRouter: perf?.drawElement?.parallelRouter,
|
||||
dePreRouterWorkers: perf?.drawElement?.preRouterWorkers,
|
||||
deGateReason: perf?.drawElement?.gateReason,
|
||||
deWorkerEncode: perf?.drawElement?.workerEncode,
|
||||
deVerifyArmed: perf?.drawElement?.verifyArmed,
|
||||
|
||||
@@ -126,6 +126,8 @@ export function trackRenderComplete(
|
||||
deClampReason?: string;
|
||||
deWorkerInversion?: string;
|
||||
dePreInversionWorkers?: number;
|
||||
deParallelRouter?: string;
|
||||
dePreRouterWorkers?: number;
|
||||
deGateReason?: string;
|
||||
deWorkerEncode?: boolean;
|
||||
deVerifyArmed?: number;
|
||||
@@ -204,6 +206,8 @@ export function trackRenderComplete(
|
||||
de_clamp_reason: props.deClampReason,
|
||||
de_worker_inversion: props.deWorkerInversion,
|
||||
de_pre_inversion_workers: props.dePreInversionWorkers,
|
||||
de_parallel_router: props.deParallelRouter,
|
||||
de_pre_router_workers: props.dePreRouterWorkers,
|
||||
de_gate_reason: props.deGateReason,
|
||||
de_worker_encode: props.deWorkerEncode,
|
||||
de_verify_armed: props.deVerifyArmed,
|
||||
|
||||
Reference in New Issue
Block a user