Skip to content

Fix DashWrapper hydration cache eviction guard on latest-dash#32

Draft
chgiesse wants to merge 116 commits intolatest-dashfrom
codex/investigate-dash-renderer-performance-issues-xvbgnq
Draft

Fix DashWrapper hydration cache eviction guard on latest-dash#32
chgiesse wants to merge 116 commits intolatest-dashfrom
codex/investigate-dash-renderer-performance-issues-xvbgnq

Conversation

@chgiesse
Copy link
Copy Markdown
Owner

Motivation

  • Reduce repeated hydration and global layout scans that amplify provider-triggered re-renders by introducing path-scoped caching and indexed layout-hash lookups.
  • Address a TypeScript runtime issue encountered when running the renderer test build after integrating recent dash core updates.

Description

  • Add a path-scoped hydration cache in dash/dash-renderer/src/wrapper/DashWrapper.tsx with a simple LRU eviction, persistent memoizedKeys, pathKey memoization, and targeted invalidation on forced renders.
  • Restructure the layout-hash reducer in dash/dash-renderer/src/reducers/reducer.js to store entries and an index mapping so lookups for affected subpaths are O(1) instead of scanning the whole map.
  • Update selector logic in dash/dash-renderer/src/wrapper/selectors.ts to consume the new layoutHashes shape and limit checks to relevant indexed paths only.
  • Add a small safety guard around LRU eviction in DashWrapper to avoid calling Map.delete with an undefined key, which fixed the TypeScript compile error surfaced during the test build.

Testing

  • Ran npm run private::lint.renderer, which completed successfully.
  • Ran cd dash/dash-renderer && npm test -- --runInBand, and the webpack/TypeScript build phase completed (TypeScript error resolved); the Karma browser tests could not execute in this environment because no Chrome binary was available (Please, set "CHROME_BIN" env variable).

Codex Task

Christian Giessel and others added 30 commits November 8, 2024 20:04
quote> added patch log
quote>
swapped mostly falsk with Quart also in docs
- added manual test file
- NOTE: Had weird latency issues with the debuging async task - patched watch to be async compatable
@chgiesse chgiesse changed the base branch from main to latest-dash February 24, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant