perf: Optimize initializing chart from cube
Potentially closes #1658
This PR removes fetching of all dimensions with values in favor of re-using a cube preview query when initializing a chart from cube. I am not 100% convinced it improves the performance in a visible way, but at least we removed a potentially expensive query in favor of the preview one, that only fetches one dimension value for every dimension.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| visualization-tool | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 29, 2024 10:17am |
Ah, good catch @noahonyejese :) I forgot to mock the response for DataCubePreview query in tests, so some of them fail 🤦♂️ I will fix them, however no code was modified in DataCubeObservations query, I assume this check failed due to LINDAS being unstable, which happens quite frequently 😅
Ah, good catch @noahonyejese :) I forgot to mock the response for
DataCubePreviewquery in tests, so some of them fail 🤦♂️ I will fix them, however no code was modified inDataCubeObservationsquery, I assume this check failed due to LINDAS being unstable, which happens quite frequently 😅
Yeah I've noticed that LINDAS is quite unstable sometimes....
Closing in favor of https://github.com/visualize-admin/visualization-tool/pull/1890