pushAllClients() already has every client profile from its own listClients() call, but looped through pushClient(key) -> getClient(key) -> listClients() again for each one - N clients meant N+1 full order-history recomputations instead of one. pushClient now accepts an optional already-known profile so the bulk path skips the redundant lookup; single-key callers (scheduleServerPush's debounce) are unaffected. compareClientSources() had the same shape of duplicate work: it called buildClients()/serverListClients() directly and then again inside mergeClientSources(). mergeClientSources() now accepts already-computed local/server arrays instead of always recomputing both. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| catalog | ||
| core | ||
| legacy | ||
| offer-gallery | ||
| offer-templates | ||
| app-runtime.js | ||
| caterium-login-logo.png | ||
| index.html | ||
| manifest.webmanifest | ||
| pwa-icon-192.png | ||
| pwa-icon-512.png | ||
| service-worker.js | ||
| sun-logo.png | ||