-
-
Notifications
You must be signed in to change notification settings - Fork 202
Store: Prevent soft hydration for inactive/null filters in Turbo Mode #9331
Description
In "Turbo Mode" (autoInitRecords: false), the Store#filter and Store#isFilteredItem methods perform "Soft Hydration" to resolve missing fields on raw data objects.
Currently, they hydrate properties for all filters in the store.filters array, even if the filter has value: null (meaning it's effectively inactive).
For complex calculated fields (like commitRatio in DevIndex, which triggers 100k+ reduce calls), this causes a massive, multi-second performance penalty when a user changes a completely unrelated, simple filter (like Country).
Fix:
Update src/data/Store.mjs so that filter() and isFilteredItem() only hydrate properties for filters where !filter.disabled && filter.value !== null. This ensures we only pay the heavy calculation penalty when a user actually activates that specific filter.