-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Selecting top-most hierarchy value by default in filters #1018
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
good to see the functionality is recovering - OTOH loading times for published charts double by this PR. 👁️ why not for published charts rely on the list and ordering in the chartConfig? |
Hi @Rdataflow, thank you for taking the time to do the testing 🙇♂️ I am fairly confident that there were no changes introduced in this pull request that could affect loading times of published charts or dataset preview, as there were only changes related to components used in the editing mode 👀 It's true that the data on TEST seems to loads faster, but – if we look at the preview deployment where the initial performance improvements were introduced (#1016, link to the same chart created using that deployment: https://visualization-tool-git-perf-published-chart-ixt1.vercel.app/en/v/4HVZl08NN58Y?dataSource=Test) it looks like loading time is comparable between the old preview deployment and the chart created by you using preview deployment from this PR. I am not 100% sure, but my assumption is that it should work faster on the TEST environment, @ptbrowne do you see any potential explanations here? PS. I also tested the performance manually by refreshing the pages with dataset preview for this PR (link) and for #1016 (link) and it looked quite random; sometimes this deployment was faster and sometimes it was the old deployment. |
@ptbrowne in case you feel confident the observed bad performance is not related to the code you may go on and double check again after this PR is merged 👍 we just need to ensure there is no bad impact |
performance on test as of now is updated in above comments |
...to fix selecting top-most hierarchy value by default
3000547
to
26f2aa7
Compare
LGTM, thanks Bartosz. |
@bprusinowski unfortunately https://test.visualize.admin.ch/de/browse?dataset=https%3A%2F%2Fenvironment.ld.admin.ch%2Ffoen%2Fnfi%2FJstat_fullHierarchy_C-94%2Fcube%2F2023-1&dataSource=Test now takes much longer than 2s previously, rather 4s+. can you check and fix this regression? NB: the other examples (see above) look fine and had no impact 👍 |
Hi @Rdataflow, I used an old deployment preview coming from March 31 (#1005), before the changes in this PR (and any recent changes to data fetching) to check the loading times before / after this PR. It seems that it also used to take about 4s to load the dataset (see link). Can you share more details on how you tested the regression in this example? |
@bprusinowski I used what was deployed on TEST as of Apr 6 at 3PM... |
Hi, thanks for the info! Taking a look right now at TEST, it seems to load quick https://test.visualize.admin.ch/de/browse?dataset=https%3A%2F%2Fenvironment.ld.admin.ch%2Ffoen%2Fnfi%2FJstat_fullHierarchy_C-94%2Fcube%2F2023-1&dataSource=Test. Maybe the server was busy last time when testing? Is it also loading fast for you @Rdataflow now? |
Thanks for looking into this @bprusinowski 🙇♂️ Agree that there may have been some transient issues upstream unrelated to the code changes in this PR. The shared URLs are responding fine for me as well. |
@bprusinowski the cube switched to a new url https://test.visualize.admin.ch/de/browse?dataset=https%3A%2F%2Fenvironment.ld.admin.ch%2Ffoen%2Fnfi%2Fnfi_C-94%2Fcube%2F2023-1&dataSource=Test the total page loading time is still the same (5s+)
real 0m4.054s @adintegra can you repro page loading time of 2s - with serverside cache: disabled and share how to achieve that? I would be interested... |
Fixes #1017.
The main problem with #1016 was that I only updated the types in
client.readQuery
inconfigurator-state.tsx
DataCubeMetadataWithComponentValuesQuery
→DataCubeMetadataWithComponentValuesQueryVariables
DataCubeMetadataWithComponentValuesQueryVariables
→DataCubeMetadataWithComponentValuesAndHierarchiesQueryVariables
but missed updating the document (
DataCubeMetadataWithComponentValuesDocument
→DataCubeMetadataWithComponentValuesAndHierarchiesDocument
), so we were accessing dimensions without hierarchies in this place.This PR fixes that (and also adds a unit test to make sure we select top-most hierarchy value by default in filters).
TODO
DataCubeMetadataWithComponentValues
&DataCubeMetadataWithComponentsValuesAndHierarchies
in favor of usingDataCubeMetadata
&DimensionValues
(so we can avoid fetching the dimension data twice in the editor mode in some cases)