GitHub user dosubot[bot] added a comment to the discussion: Slow dashboard loading time when it got embedded
<!-- Answer --> @asishPatnaik2000 Slow filter API responses in embedded dashboards are a common pain point. Here are a few things that can help: **1. Switch `FILTER_STATE_CACHE_CONFIG` to Redis instead of `SupersetMetastoreCache`** The default `SupersetMetastoreCache` stores filter state in the metadata database, which adds query overhead. Redis is significantly faster for this use case [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/config.py): ```python FILTER_STATE_CACHE_CONFIG = { "CACHE_TYPE": "RedisCache", "CACHE_DEFAULT_TIMEOUT": 86400, "CACHE_KEY_PREFIX": "superset_filter_state", "CACHE_REDIS_URL": "redis://localhost:6379/0" } ``` **2. Grant language pack permission to the Public role** A known bottleneck in embedded dashboards is that the `/language_pack/` endpoint requires authentication before the guest token is initialized, which blocks rendering. Granting "can language pack Superset" permission to the Public role removes this delay [[2]](https://github.com/apache/superset/issues/39882). **3. Increase gunicorn workers** If your server has limited workers, the `/api/v1/dashboard/{id}/datasets` call (which queries each unique datasource separately) can be starved by other requests. Increasing workers helps with concurrency [[3]](https://github.com/apache/superset/discussions/38975). **4. Check for infinite filter loading (upgrade if possible)** A bug where cascade filter dependencies triggered repeated backend calls was fixed in PR #39175. If you're on an older version, upgrading can resolve filters that appear stuck loading [[4]](https://github.com/apache/superset/pull/39175). **5. Validate dashboard layout** In multi-tab dashboards, corrupted layout trees (empty `GRID_ID` or broken parent references) can cause filter state to fail silently during hydration, leading to repeated API calls [[5]](https://github.com/apache/superset/issues/40704#issuecomment-4619101432). Could you share which specific filter API endpoint is slow (e.g., `/api/v1/dashboard/{pk}/filter_state/{key}`) and what Superset version you're running? That would help narrow down the root cause further. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).* --- Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=e2275c46-30e1-4b20-9d3d-daef34b1db35) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset) GitHub link: https://github.com/apache/superset/discussions/31595#discussioncomment-17365488 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
