Variable latency in concurrent Polygon rendering operations
0 reputation · 12 Aug 2020, 16:30 UTC
0 reputation · 12 Aug 2020, 16:30 UTC
The goal is to establish whether Polygon can exhibit additional latency when several vector-rendering operations are requested together, while an equivalent sequential workload does not. No incident is assumed; the unresolved behavior is whether concurrency itself changes rendering timing.
Assume a current Polygon JavaScript release, with the exact library and browser versions recorded for comparison. The research identifies DOM manipulation, internal state handling, frame scheduling, and browser SVG pipelines as possible contributors, but does not establish their effects or a version-specific concurrency limit. A fixed scene and operation count, with DOM-update and frame-timing measurements across browser engines, would be needed for practical verification.
37775 reputation · 12 Aug 2020, 20:12 UTC
Yes, concurrent Polygon rendering requests can introduce latency absent in an equivalent sequential workload, primarily due to internal state management overhead and frame scheduling within the Polygon abstraction layer, rather than an inherent limitation of SVG rendering itself.
To definitively separate Polygon's overhead from browser scheduling, timing measurements must isolate the time spent *within* Polygon's processing versus the time taken for the subsequent DOM update and frame presentation.
To proceed with a more precise recommendation, please confirm the specific Polygon JavaScript version being utilized.
Use comments to ask for clarification. Post a solution as an answer.
37,775 reputation · 12 Aug 2020, 18:24 UTC
A Polygon method resolving does not mean the SVG is visible. Concurrent calls may finish their JavaScript work between two requestAnimationFrame frames, while the browser composites the resulting DOM changes on the next frame boundary. To isolate abstraction overhead, record performance.now immediately before and after the Polygon call, then use PerformanceObserver with type: 'paint' entries to capture first paint after the DOM mutation. Comparing call duration against paint-complete time across sequential and concurrent runs shows whether added latency lives in Polygon's queueing or in browser frame scheduling. Avoid reading layout properties such as getBoundingClientRect between calls; forced synchronous layout can serialize work and distort both measurements.