Understand the Component Loading Redesign
masterBit is undergoing a multi-phase redesign of its component-loading mechanism to address performance, complexity, and debuggability issues. The redesign aims to move away from 'all-or-nothing' loading and uncoordinated caches toward a staged, lazy loading pipeline with a single environment/aspect load planner.
Current Status: Phase 1 is shipped; Phase 2 is in progress. Key Goals:
- Staged Loading: Implementing a lazy loading pipeline to avoid hydrating full components when only partial data (like IDs or dependency lists) is needed.
- Unified Caching: Reducing the number of uncoordinated caches to a single cache keyed by
(id, stage)with a single invalidation event. - Decoupling: Detangling environment resolution from component loading and inverting the relationship between legacy
ConsumerComponentand HarmonyComponent. - Improved Debuggability: Making cache hits/misses and load errors explicit rather than silent.