Skip to content

perf(native): re-measure a table only when the hover band changes row - #448

Merged
EraPartner merged 2 commits into
mainfrom
claude/project-thread-8jt6md
Nov 14, 2026
Merged

EraPartner merged 2 commits into
mainfrom
claude/project-thread-8jt6md

Conversation

@EraPartner

Copy link
Copy Markdown
Owner

Requested by EraPartner · project thread

Summary

VisionTable's hover band tracked the pointer's y. Every pointer move changed a layout property, which reset the layout cache and re-measured every cell. The view now maps the pointer to a row index (from the row bounds of the last placement, kept in a reference box) and passes only that index to the layout, so the table is re-measured only when the pointer crosses into another row. The look is unchanged.

The second review item (sankey hover hit areas) was already fixed on main by #446 (one tracker that hit-tests node rectangles and stroked band outlines), so this PR does not touch it.

Type of change

  • perf — performance

Checklist

  • Lint is clean for the native sources (bun scripts/native-lint.ts: native-lint ok)
  • Conventional Commit title
  • No leftover debug code

Architecture & data

  • No architectural change
  • No API change
  • No schema change

Verification

  • bun scripts/native-lint.ts: native-lint ok
  • Not compiled locally (no macOS toolchain in the cloud); the swift CI job is the compile check. Not looked at on a Mac.

Residual risk & follow-ups

  • The row bounds are written during placement. The first hover after a resize can use bounds from the previous placement for one frame.

Generated by Claude Code

The table hover band tracked the pointer's y, so every pointer move changed
the layout and re-measured the whole table. It now tracks the hovered row
index, read from the row bounds of the last placement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018QJtaKt8X8tTpztJkkqNjD
@EraPartner EraPartner self-assigned this Nov 14, 2026
@EraPartner
EraPartner marked this pull request as ready for review November 14, 2026 21:51
@EraPartner
EraPartner enabled auto-merge (squash) November 14, 2026 21:51
@EraPartner
EraPartner merged commit 8577bcd into main Nov 14, 2026
3 of 4 checks passed
@EraPartner
EraPartner deleted the claude/project-thread-8jt6md branch November 14, 2026 22:00
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.

2 participants