Reduce extra work in line sampling count
Copilot pointed out two hot-path costs in the dataZoom-aware sampling fix. The safe change is to reuse the base-axis scale and call scale.contain on already-parsed store values, avoiding Axis#containData parsing for every item. The suggested direct numeric extent check was tested but regressed filterMode none in the HTML case, so this keeps scale containment semantics while still removing repeated parsing. The processor also exits before scanning the dataset when the post-filter count already cannot exceed the pixel sampling size. Constraint: filterMode none relies on scale containment semantics during processing; direct scale extent comparison did not preserve the regression case Rejected: Direct min/max check from scale.getExtent() | made none+lttb downsample to 1002 points in the regression page Confidence: high Scope-risk: narrow Tested: npm run checktype -- --pretty false Tested: npm run lint -- --quiet src/processor/dataSample.ts Tested: git diff --check -- src/processor/dataSample.ts Tested: test/line-sampling-dataZoom-filterMode.html via Chrome, PASS after Copilot feedback changes Not-tested: Full visual regression suite
S
susiwen8 committed
8d34ed81c1c1fa77c37dc2d52f644e071d341204
Parent: 11ba3e3