Skip to content

perf(android): bound occlusion coverage memory - #1982

Merged
thymikee merged 1 commit into
mainfrom
perf/android-rect-coverage
Aug 24, 2026
Merged

perf(android): bound occlusion coverage memory#1982
thymikee merged 1 commit into
mainfrom
perf/android-rect-coverage

Conversation

@thymikee

@thymikee thymikee commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary

Android snapshot occlusion now measures rectangle-union coverage with an event-driven sweep instead of allocating a Cartesian X/Y cell grid.

This keeps exact union semantics, drawing-order policy, the 90% coverage threshold, deterministic work budgets, and cooperative cancellation while allowing broad valid footprints to complete within their existing caps. The geometry now lives in one Android-owned module with oracle-backed tests.

The separate quadratic sibling-candidate scan remains out of scope. No snapshot schema, CLI surface, docs, or skills changed.

Validation

Before the fix, planted regression runs exhausted the original 1,024- and 1,650-work-unit caps. Both cases pass at those same caps after the change.

pnpm check:affected --run passed: 273 test files and 1,845 tests, including provider integration, format, lint, typecheck, layering, Fallow, and build.

Live Android emulator verification at b82669f8 captured Settings through android-helper 0.20.10 with healthy snapshot quality: 118 acquired nodes, 34 presented nodes, and 312 ms helper time. The verification session was closed.

@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 2.37 MB 2.37 MB +494 B
JS gzip 797.9 kB 798.0 kB +173 B
npm tarball 919.3 kB 919.5 kB +249 B
npm unpacked 3.19 MB 3.19 MB +494 B

npm unpacked components

Component Base Current Diff
JS / dist source 2.52 MB 2.52 MB +494 B
Apple runner source/project 564.3 kB 564.3 kB 0 B
macOS helper source 54.5 kB 54.5 kB 0 B
Android helper artifacts 0 B 0 B 0 B
Other package files 44.5 kB 44.5 kB 0 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 29.8 ms 28.5 ms -1.3 ms
CLI --help 80.6 ms 80.6 ms -0.0 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/snapshot.js +494 B +173 B

Top changed packed files

Packed file Base Current Diff
dist/src/snapshot.js 31.3 kB 31.8 kB +494 B

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Aug 23, 2026
@thymikee

Copy link
Copy Markdown
Member Author

Clean and merge-ready at b82669f8. The event-driven X sweep preserves exact union/intersection semantics and the existing >= 0.9 publication rule while replacing the Cartesian allocation. Focused tests and exact-head live Android evidence are valid; all 27 checks, including Android Smoke, are green, and size growth is only +494 B. Non-blocking residual: active Y intervals are re-sorted per slab, so adversarial staggered inputs are bounded by the cooperative work budget rather than formally linear time.

@thymikee
thymikee merged commit 7aaa559 into main Aug 24, 2026
27 checks passed
@thymikee
thymikee deleted the perf/android-rect-coverage branch August 24, 2026 05:59
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-24 05:59 UTC

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

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant