Skip to content

perf(render): apply regions directly with prepared fingerprints#113

Closed
TypeThe0ry wants to merge 1 commit into
devfrom
codex/perf-region-direct-apply
Closed

perf(render): apply regions directly with prepared fingerprints#113
TypeThe0ry wants to merge 1 commit into
devfrom
codex/perf-region-direct-apply

Conversation

@TypeThe0ry

Copy link
Copy Markdown
Member

What changed

  • Replaces hot-path queued action objects and captured lambdas with five fixed-priority region passes.
  • Preserves cleanup, priority order, budget boundaries, deferred retry semantics, and planned/processed/remaining metrics.
  • Precomputes exact hand, discard, meld, wall, and shared-region fingerprints off the region thread.
  • Adds planning-time, skipped-region, actual-update, and deferred metrics.
  • Adds differential coverage for ordering and budget boundaries.

Why

Every refresh built multiple temporary lists and hundreds of captured actions, while exact FNV fingerprints were recomputed on the region thread.

Impact

Region keys, exact FNV values, entity specifications, update order, and one-tick deferred behavior remain unchanged.

Evidence

Eight paired runs:

  • stable apply: 8/8 wins, about 42.6% lower time and 48.3% lower allocation
  • plan/defer: 8/8 wins, about 36.6% lower time and 78.3% lower allocation

Validation

  • TableRegionDisplayCoordinatorTest
  • jmhJar
  • spotlessCheck
  • full integration test suite passed before commit splitting

@Arbousier1
Arbousier1 force-pushed the codex/perf-region-direct-apply branch from 11ddee1 to 2bed25c Compare July 18, 2026 12:57
@Arbousier1 Arbousier1 added performance-region-apply Use the complete region render apply performance profile performance-ab Run the base-owned paired performance gate and removed performance-ab Run the base-owned paired performance gate performance-region-apply Use the complete region render apply performance profile labels Jul 18, 2026
@Arbousier1

Copy link
Copy Markdown
Collaborator

Formal trusted A/B run did not pass: INCONCLUSIVE_NOISE_OR_NO_GAIN. Evidence: https://github.com/EllanServer/MahjongEngine/actions/runs/29645451416. Closing per the performance gate policy.

@Arbousier1 Arbousier1 closed this Jul 18, 2026
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