You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following #731 (points kept colour as codes+palette): the shared legend/decoration path still expands the compact pd.Categorical (codes + tiny hex palette) to an O(n_elements) object array once per render — for points, shapes and labels.
Three spots, each only needs the k categories:
_want_decorations (render.py:133): np.asarray(color_vector) + O(n) == scan → use .categories/.codes.
_decorate_axs (utils.py:493): builds an n-row DataFrame then drop_duplicates to recover a k-sized cat→colour dict that already exists upstream (_color.py:678).
Fix: read .categories/.codes (k entries) instead of materializing the per-element vector. Lowest-effort, benefits all three renderers at once. Must stay output-identical.
Activity
perf: unify first-colour-per-category; stop re-expanding the categori…