From a full data-transport audit at b0f8780. Individually small; batch when touching the files:
Python encode:
- Split-mode
ship_u8 pads via full-buffer np.concatenate (python/xy/_payload.py:82-90); padding is structurally unnecessary in split mode (each buffer starts at offset 0) — kept only for the byte-identical-repack invariant (tests/test_figure.py:90).
- Constant-baseline area/error_band materialize + ship an N-length constant column (
python/xy/marks.py:881, _emit_area); bars already have the value0_const scalar optimization (_payload.py:819-822) — mirror it.
direct_rgba packing makes 3 full-size f64 temporaries: np.rint(np.clip(v,0,1)*255).astype(u8) (python/xy/channels.py:540) — chain with out= or a native kernel.
- Rect center column built with chained temporaries (
python/xy/_figure.py:956); hexbin emitter re-scans min/max via ship_values instead of reusing its Columns' zone maps (_payload.py:501-502).
- Datetime ingest pays 2 copies where a fused native i64→f64-ms kernel needs 1 (
python/xy/columns.py:425-437; copy counts pinned in tests/test_figure.py:190-191).
memory_report runs a full payload build just to report first-paint bytes (python/xy/_figure.py:1771).
Transport / hosts:
- Reflex serves a fresh
build_payload_split() per subscriber (python/reflex-xy/reflex_xy/namespace.py:128-145) — cache on (figure version, px bucket).
payload_asset joins the packed blob and then encode_frame joins again (payload_asset.py:68 → _framing.py:200-208) — write encode_frame_parts sequentially, hash incrementally.
_repr_html_ html.escape doubles the doc (python/xy/_figure.py:1643-1645).
Client:
tier_update reallocates STATIC_DRAW buffers per refinement; bufferSubData when byteLength matches (js/src/54_kernel.ts:294-306).
- Single style channel pads to vec4 per point (16 B/pt) in three copy-pasted loops (
50_chartview.ts:2102, 45_lod.ts:289, 50_chartview.ts:2305) — scalar cases could be uniforms.
- Append animation matching builds O(n)
toPrecision(12) string keys (js/src/56_animation.ts:286-296) — numeric-key Map on fround bits.
- Sync 1x1
readPixels per pointermove + pick re-render during density blend easing (50_chartview.ts:4437-4471) — async fence readback if it shows in profiles.
From a full data-transport audit at b0f8780. Individually small; batch when touching the files:
Python encode:
ship_u8pads via full-buffernp.concatenate(python/xy/_payload.py:82-90); padding is structurally unnecessary in split mode (each buffer starts at offset 0) — kept only for the byte-identical-repack invariant (tests/test_figure.py:90).python/xy/marks.py:881,_emit_area); bars already have thevalue0_constscalar optimization (_payload.py:819-822) — mirror it.direct_rgbapacking makes 3 full-size f64 temporaries:np.rint(np.clip(v,0,1)*255).astype(u8)(python/xy/channels.py:540) — chain without=or a native kernel.python/xy/_figure.py:956); hexbin emitter re-scans min/max viaship_valuesinstead of reusing its Columns' zone maps (_payload.py:501-502).python/xy/columns.py:425-437; copy counts pinned intests/test_figure.py:190-191).memory_reportruns a full payload build just to report first-paint bytes (python/xy/_figure.py:1771).Transport / hosts:
build_payload_split()per subscriber (python/reflex-xy/reflex_xy/namespace.py:128-145) — cache on (figure version, px bucket).payload_assetjoins the packed blob and thenencode_framejoins again (payload_asset.py:68→_framing.py:200-208) — writeencode_frame_partssequentially, hash incrementally._repr_html_html.escape doubles the doc (python/xy/_figure.py:1643-1645).Client:
tier_updatereallocates STATIC_DRAW buffers per refinement;bufferSubDatawhen byteLength matches (js/src/54_kernel.ts:294-306).50_chartview.ts:2102,45_lod.ts:289,50_chartview.ts:2305) — scalar cases could be uniforms.toPrecision(12)string keys (js/src/56_animation.ts:286-296) — numeric-key Map on fround bits.readPixelsper pointermove + pick re-render during density blend easing (50_chartview.ts:4437-4471) — async fence readback if it shows in profiles.