Skip to content
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 metadata loading issues after tabs #42655

Merged
merged 4 commits into from
May 14, 2024
Merged

Conversation

ranquild
Copy link
Contributor

@ranquild ranquild commented May 14, 2024

Regression from #31578

The issue was that previously we used to load all metadata upfront before showing dashcards on the screen. With the PR above we no longer do that and instead show dashcards immediately; each dashcard is responsible for loading metadata. The problem is that this causes severe performance issues with MBQL lib as metadata keeps constantly changing for queries on the screen, leading to 15s+ UI thread locks.

How to verify:

  • This change should be invisible to e2e tests. There are new unit tests for this case.

https://metaboat.slack.com/archives/C505ZNNH4/p1715690842065689

@@ -126,10 +127,11 @@ export const fetchDashboard = createAsyncThunk(
fetchDashboardCancellation = null;

if (dashboardType === "normal" || dashboardType === "transient") {
const selectedTabId = getSelectedTabId(getState());
const selectedTabId =
getSelectedTabId(getState()) ?? getInitialSelectedTabId(result);
Copy link
Contributor Author

@ranquild ranquild May 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to make sure the initial performance fix still works. getSelectedTabId works when the dashboard was previously opened, otherwise we use getInitialSelectedTabId

@ranquild ranquild added the backport Automatically create PR on current release branch on merge label May 14, 2024
Copy link

replay-io bot commented May 14, 2024

Status Complete ↗︎
Commit 850e977
Results
⚠️ 2 Flaky
2506 Passed

@ranquild ranquild merged commit 1519acb into master May 14, 2024
123 of 144 checks passed
@ranquild ranquild deleted the dashboard-metadata-perf-2024 branch May 14, 2024 19:04
Copy link

@ranquild Did you forget to add a milestone to the issue for this PR? When and where should I add a milestone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Automatically create PR on current release branch on merge .Team/QueryingComponents
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants