()
| 1176 | }) |
| 1177 | ); |
| 1178 | walked += chunk.length; |
| 1179 | onProgress( |
| 1180 | 0.7 + 0.28 * (walked / Math.max(1, remEntries.length)), |
| 1181 | `Resolving (${walked}/${remEntries.length})` |
| 1182 | ); |
| 1183 | } |
| 1184 | |
| 1185 | onProgress(1, 'Loaded'); |
| 1186 | return { remDataById, parentChainCache, remTextCache, parentByRemId }; |
| 1187 | } |
| 1188 | |
| 1189 | // Aggregate already-loaded data for a specific period. Pure in-memory work — |
| 1190 | // no RPC calls. Safe to call repeatedly on period changes. |
| 1191 | function aggregateGlobalData( |
| 1192 | data: LoadedGlobalData, |
| 1193 | startMs: number, |
| 1194 | endMs: number, |
| 1195 | cardCapMs: number, |
| 1196 | ignorePreReset: boolean, |
| 1197 | onProgress: (p: number, label: string) => void |
| 1198 | ): { |
| 1199 | topLevels: DashboardData['topLevels']; |
| 1200 | summary: SummaryStats; |
no test coverage detected