The version re-validation effect could not tell "the versions fetch has not landed yet" from "this source has no versions", because both look like an empty array. So a versionId restored from localStorage was cleared on the first render and set straight back when the fetch returned: 29 -> '' -> 29. Forecast's load effect is keyed on [versionId, sourceId], so that round trip ran initViewer twice. Two /agg requests, two full aggregations in Postgres, two Arrow payloads -- on version 29 that is the 285k-row aggregate computed twice at ~17s each, which is most of the "it hangs before it displays" and the Postgres process sitting at the top of htop. sourcesLoaded already guarded the identical effect for sources; versions just never got the same treatment. Cleared when the source changes, since the list belongs to the previous source until the new fetch lands. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| vendor | ||
| .gitignore | ||
| eslint.config.js | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| vite.config.js | ||
React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.