Frontmatter
| id | 9415 |
| title | Support "Turbo Mode" in `Neo.data.TreeStore` |
| state | Closed |
| labels | enhancementaiperformancecore |
| assignees | tobiu |
| createdAt | Mar 9, 2026, 3:13 PM |
| updatedAt | Mar 9, 2026, 3:22 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9415 |
| author | tobiu |
| commentsCount | 2 |
| parentIssue | 9404 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 9, 2026, 3:22 PM |
Support "Turbo Mode" in Neo.data.TreeStore
tobiu added parent issue #9404 on Mar 9, 2026, 3:14 PM

tobiu
Mar 9, 2026, 3:22 PM
Input from Gemini 3.1 Pro:
✦ Implemented Turbo Mode support for
TreeStore.
- Overrides the newly centralized
hydrateRecordmethod from the baseStore.- Intercepts lazy instantiation events to "heal"
#allRecordsMapand#childrenMap, ensuring they always maintain the unifiedRecordidentity instead of diverging with raw object references.Changes pushed to
dev.
tobiu assigned to @tobiu on Mar 9, 2026, 3:22 PM

tobiu
Mar 9, 2026, 3:22 PM
Implemented Turbo Mode support for TreeStore. Pushed to dev.
tobiu closed this issue on Mar 9, 2026, 3:22 PM
Goal
Ensure
Neo.data.TreeStorecan safely operate withautoInitRecords: false("Turbo Mode") without suffering from identity fragmentation between the main_itemsarray and its internal tree maps.Context
When a
TreeStoreingests raw JSON data in Turbo Mode, its#childrenMapand#allRecordsMapstore references to those raw objects. If the Grid accesses a node viastore.get(), the baseStoreinstantiates aNeo.data.Record. At that moment, the identity diverges: the main_itemsarray holds theRecord, but the#childrenMapstill holds the raw JSON object. If theRecordmutates (e.g.,collapsedstate changes), the#childrenMapremains unaware.Architecture
hydrateRecordmethod from the parentStore(see dependency).hydrateRecord(item, index)inTreeStore.mjs.super.hydrateRecord(item, index).Record, find the old raw object in#allRecordsMapand#childrenMapand replace it with the newRecordinstance.Dependencies