Files
cnx_vinyl/docs
grabowski f776025b58
Deploy test site / deploy (push) Successful in 53s
Plant overview: motion on canvas, no more lag
The page spent most of each second laying out the SVG, not simulating:
the simulation itself costs ~26 ms per simulated hour. Profiled headless
on Edge (CDP metrics and a timeline trace with invalidation tracking):

- tokens asked the DOM for getPointAtLength right after writing a
  transform, which forced a layout of the whole SVG for every token,
  every frame (540 to 630 ms/s);
- ~55 CSS stroke-dashoffset animations repainted the drawing all the
  time;
- the press platens were SVG rects moved every frame, and any geometry
  write re-lays-out the whole SVG with its 275 text labels.

Now the SVG holds only the machines and labels. Pipes, flow dashes and
the conveyor are drawn on a canvas under it; tokens, records, platens,
cakes, the extruder screw and plating bubbles on a canvas over it, both
with the SVG's own viewBox transform, so pan and zoom need nothing extra.
Routes are measured polylines (ptAt) instead of DOM path queries, and
the 5 Hz tag, lamp and KPI writes only touch the DOM when the value
changes.

Headless Edge, 1600 x 900, before -> after:
  1x     26 -> 60 fps, layout 842 -> 26 ms/s, long tasks 19 -> 0
  60x    19 -> 59 fps, layout 858 -> 29 ms/s
  600x   18 -> 60 fps, layout 855 -> 30 ms/s
  3600x  33 -> 60 fps, layout 726 -> 29 ms/s

Behaviour unchanged: all press states seen at 3600x, 47 stations open
their detail, steam dip holds and recovers, lot and repress log, no text
overflow at 1600 x 900 and 1258 x 800, canvas and SVG agree within
0.2 px at fit, zoomed, 1258 x 800 and phone size, both themes, no
errors.
2026-10-14 09:16:38 +07:00
..
2026-10-07 09:24:35 +02:00