Hi Team, I have kind of a strange question. We hav...
# gooddata-cloud
g
Hi Team, I have kind of a strange question. We have GD Cloud embedded in our portal using Iframe. We would like to lower the overload on the database server by any means necessary. My question is, when a dashboard loads, it sends calls to GoodData to fetch each of the insights by a separate call (or almost a separate calls). If I have used Visualization Switcher, does this create calls and calculation for the hidden insights in the switcher or they are called when switched? I think that they are all loaded on the first load of the dashboard but I needed a confirmation. Additionally, I see that there are also tabs (not used them so far) so my question is about tabs. When I load a multi-tab dashboard, does on the first load on the dashboard, load all insights from other tabs as well or just the active tab?
k
Thinking completed Here is how GoodData handles execution and loading for both the Visualization Switcher and Dashboard Tabs: 1. Visualization Switcher Loading Behavior In the Visualization Switcher component, all visualizations are loaded, but their execution is staged [EditModeDashboardVisualizationSwitcher.tsx; AllVisualizationsDashInsights.tsx]: • On initial render or filter changes, only the currently active visualization executes immediately. • Once the primary dashboard executions complete (
isDashboardExecuted
is true and re-execution settles), background execution triggers for the remaining hidden visualizations (
showOthers: true
) [useExecutionProgress.tsx; AllVisualizationsDashInsights.tsx]. • Therefore, your assumption is correct: queries and calculations for hidden visualizations in the switcher are executed during the dashboard load session (pre-warmed in the background so that switching appears instantaneous), rather than waiting until the user manually switches. 2. Multi-Tab Dashboard Loading Behavior Unlike the switcher, Dashboard Tabs do not load all tabs upfront [Tab Loading Behavior]: • Initial Load: Only visualizations on the currently active/visible tab are loaded and executed against the database [Tab Loading Behavior]. Visualizations on non-active tabs send no queries on the first load [Tab Loading Behavior]. • Switching Tabs: When a user clicks to another tab for the first time, only then do the visualizations on that specific tab begin loading [Tab Loading Behavior]. • Revisiting Tabs: Returning to an already-visited tab displays immediately from client cache without re-executing visualizations against the database [Tab Loading Behavior]. Recommendation to Reduce Database Load If minimizing initial database strain and concurrency is your primary objective: 1. Use Dashboard Tabs: Moving non-essential or secondary visualizations onto separate tabs ensures queries for them are never executed unless a user actively navigates to that tab [Tab Loading Behavior]. 2. Leverage FlexCache: GoodData caches query results in FlexCache [FlexCache]. Once queries are cached, identical dashboard views serve from cache without hitting your database [FlexCache]. You can also pre-warm critical dashboards after your data updates using the AFM execution API (
POST /execution/afm/execute
) [Community Slack]. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups. 👀 Our Support team monitors all messages and will jump in if needed.
g
Great thanks