Skip to content

Skip finite/log visibility scans when zone maps already prove all-finite on linear axes #169

Description

@Alek99

From a full data-transport audit at b0f8780.

Today: _finite_sel correctly consults zone-map null_count first (python/xy/_payload.py:352-362), but _log_visible_mask (_payload.py:364-380) — called unconditionally from _emit_line (:422) and _emit_scatter (:466-470) — then recomputes isfinite(xv) & isfinite(yv) plus np.all(mask): ~3-4 full O(N) passes per trace per build that are provably all-true when null_count == 0 and neither axis is log.

Proposed fix: guard with if null_count or x_log or y_log: before building the mask; return the no-mask fast path otherwise. Pure CPU win on every direct build of every line/scatter trace; one-line-ish change plus tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs investigateAudit finding awaiting validation/measurementperformanceReduces copies, bytes, or CPU on the data path

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions