Skip to content

Performance optimization for visibility - #217

Open
Randl wants to merge 1 commit into
Caltech-IPAC:mainfrom
Randl:perf/wise-visibility
Open

Randl wants to merge 1 commit into
Caltech-IPAC:mainfrom
Randl:perf/wise-visibility

Conversation

@Randl

@Randl Randl commented Nov 11, 2026

Copy link
Copy Markdown
  1. Avoid constructing discarded states and cloning names during WISE rejection checks
  2. Reduce branches in polygon containment checks

Total speedup in WISE tutorial ~2.2x

Skip discarded State construction and designation cloning in WISE linear
rejection checks. Preserve the existing check_linear override behavior for
other FovLike implementations through a default containment-only method.

Reduce branching while accumulating polygon edge distances, preserving
signed-zero, NaN, and infinity behavior.

Validation on top of the existing main optimizations: full WISE tutorial
175.96s -> 79.46s (54.8% less time, two runs per version, cached inputs).
Propagated states, visibility data, and printed output are bitwise identical.
Passed 53 Rust tests, 795 Python tests, and 2 million geometry comparisons.
@annie444 annie444 added the enhancement New feature or request label Dec 3, 2026
@annie444

annie444 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

I greatly appreciate your PR! However, I should inform you that if you're making these modifications for the kete python package from pypi.org, that development has moved to dahlend/kete.

Regardless, we'll run some regression tests here and send you our feedback!

@dahlend

dahlend commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

These PR issues were also fixed in my copy a while ago.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants