visualization-tool icon indicating copy to clipboard operation
visualization-tool copied to clipboard

perf: Optimize initializing chart from cube

Open bprusinowski opened this issue 1 year ago • 3 comments

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.

bprusinowski avatar Aug 29 '24 10:08 bprusinowski

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

vercel[bot] avatar Aug 29 '24 10:08 vercel[bot]

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 😅

bprusinowski avatar Aug 30 '24 07:08 bprusinowski

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 😅

Yeah I've noticed that LINDAS is quite unstable sometimes....

noahonyejese avatar Aug 30 '24 07:08 noahonyejese

Closing in favor of https://github.com/visualize-admin/visualization-tool/pull/1890

bprusinowski avatar Nov 18 '24 16:11 bprusinowski