Commit ab684ac
committed
Avoid redundant full-extent sampling scans
Copilot review pointed out that the previous fast path still scanned when the processed data count matched the raw count, even if the base-axis scale already contained the data extent. The extent check alone is enough to decide whether a visible-window count is needed.
This preserves the scan for dataZoom none/empty narrow windows, while avoiding it for the fully visible or already-filtered cases whose data extent is inside the current axis extent.
Constraint: dataZoom none/empty can keep raw count while the visible axis window is narrow
Rejected: Keep raw-count equality as a scan trigger | it regresses the fully visible common path
Confidence: high
Scope-risk: narrow
Directive: Use the base-axis extent relationship, not raw-count equality, to decide whether the count scan is necessary
Tested: git diff --check -- src/processor/dataSample.ts; npm run lint -- --quiet src/processor/dataSample.ts; npm run checktype -- --pretty false; Chrome headless HTML regression screenshot
Not-tested: Full visual regression suite1 parent 53fb219 commit ab684ac
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
| 134 | + | |
136 | 135 | | |
137 | 136 | | |
138 | 137 | | |
| |||
0 commit comments