Skip to content

build: require anyplotlib>=0.4.2 (pan-diagnostic fix) - #45

Merged
CSSFrancis merged 1 commit into
mainfrom
chore/anyplotlib-042-pin
Jul 27, 2026
Merged

build: require anyplotlib>=0.4.2 (pan-diagnostic fix)#45
CSSFrancis merged 1 commit into
mainfrom
chore/anyplotlib-042-pin

Conversation

@CSSFrancis

Copy link
Copy Markdown
Member

anyplotlib 0.4.2 (CSSFrancis/anyplotlib#42) gates the [TILEDBG] FETCH diagnostic behind isEnabledFor(DEBUG).

Before it, np.unique ran on the raw native crop and on the tile as arguments to a .debug() call — so every pan/zoom settle paid for two full sorts at any log level. With VIEW_OVERFETCH = 2.0 the over-fetched crop is the whole image at any zoom below 2×, which is where panning actually happens.

Pan settle on a 4096² frame, measured on the released wheel:

zoom before after
1.1× 377 ms 93 ms
377 ms 93 ms
125 ms 62 ms

Verified the shipped artifact rather than trusting the tag: zero executable np.unique lines remain in _on_view_changed_internal. (The string still appears there — but only inside the comment explaining why the guard exists, which is worth knowing before someone greps and panics.)

Two lines plus the lockfile. uv lock --check clean.

Note on the upstream release

anyplotlib''s Release workflow reports failed for v0.4.2, but only its last job: "Create GitHub Release" errored with "a release with the same tag name already exists: v0.4.2". Build distribution and Publish to PyPI both succeeded — the wheel and sdist are on PyPI (uploaded 2026-07-26T20:53:35). The red X is cosmetic; nothing needs re-running.

Needed for rc.9.

anyplotlib 0.4.2 gates the [TILEDBG] FETCH diagnostic behind
isEnabledFor(DEBUG). Before it, np.unique ran on the raw native crop and on
the tile as ARGUMENTS to a .debug() call, so every pan/zoom settle paid for
two full sorts at any log level -- 259 ms on a 4096^2 frame at the zoom
where VIEW_OVERFETCH makes the crop the whole image.

Measured on the released wheel, pan settle on a 4096^2 frame:
  zoom 1.1x   377 -> 93 ms
  zoom 2x     377 -> 93 ms
  zoom 4x     125 -> 62 ms

Verified the shipped artifact rather than assuming the tag: zero EXECUTABLE
np.unique lines remain in _on_view_changed_internal (the string still occurs,
but only in the comment explaining why the guard is there).
@CSSFrancis
CSSFrancis merged commit a5264ef into main Jul 27, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant