GitHub user dosubot[bot] added a comment to the discussion: Checking Dashboard 
Size

<!-- Answer -->
There isn’t a single built-in feature in Superset that shows dashboard “size,” 
but you can measure it in a few ways depending on what you mean:

- If you want to know the storage size (how much layout/config data is stored), 
Superset uses a field called `position_json` to store the dashboard layout. The 
character length of this field is what matters for the internal limit (default 
is 65,535 characters, configurable via 
`SUPERSET_DASHBOARD_POSITION_DATA_LIMIT`). If you hit this limit, you’ll see a 
“dashboard too large” error. You can check the length of `position_json` in the 
database or via the API if you need to estimate this metric 
[discussion](https://github.com/apache/superset/discussions/36250).

- If you want to know the complexity (number of charts, datasets, or tabs), you 
can use the API endpoints: `/api/v1/dashboard/<id_or_slug>/charts`, 
`/datasets`, and `/tabs` to get counts of each component [API 
reference](https://github.com/apache/superset/blob/master/superset/dashboards/api.py).

- If you want a proxy for the dashboard’s export size, you can export the 
dashboard as a YAML file using the `/export/` endpoint and check the file size 
of the exported YAML [API 
reference](https://github.com/apache/superset/blob/master/superset/dashboards/api.py).

- If you mean the rendered size (width/height in pixels), there are frontend 
methods like `getScrollSize()` that return the dashboard’s scrollable area, but 
this is only about the UI, not storage or complexity 
[source](https://github.com/apache/superset/blob/master/superset-frontend/src/embedded/api.tsx).

Let me know which metric you’re most interested in and I can help with more 
specific steps.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/f657f000-f704-4fb6-98e4-f08eded4cc1d?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/f657f000-f704-4fb6-98e4-f08eded4cc1d?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/f657f000-f704-4fb6-98e4-f08eded4cc1d?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/f657f000-f704-4fb6-98e4-f08eded4cc1d?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/f657f000-f704-4fb6-98e4-f08eded4cc1d?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/f657f000-f704-4fb6-98e4-f08eded4cc1d?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/f657f000-f704-4fb6-98e4-f08eded4cc1d?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=There%20isn%E2%80%99t%20a%20single%20built-in%20feature%20in%20Superset%20that%20shows%20dashboard%20%E2%80%9Csize%2C%E2%80%9D%20but%20you%20can%20measure%20it%20in%20a%20few%20ways%20depending%20on%20what%20you%20mean%3A%0A%0A-%20If%20you%20want%20to%20know%20the%20storage%20size%20%28how%20much%20layout/config%20data%20is%20stored%29%2C%20Superset%20uses%20a%20field%20called%20%60position_json%60%20to%20store%20the%20dashboard%20layout.%20The%20character%20length%20of%20this%20field%20is%20what%20matters%20for%20the%20internal%20limit%20%28default%20is%2065%2C535%20characters%2C%20configurable%20via%20%60SUPERSET_DASHBOARD_POSITION_DATA_LIMIT%60%29.%20If%20you%20hit%20this%20limit%2C%20you%E2%80%99ll%20see%20a%20%E2%80%9Cdashboard%20too%20large%E2%8
 
0%9D%20error.%20You%20can%20check%20the%20length%20of%20%60position_json%60%20in%20the%20database%20or%20via%20the%20API%20if%20you%20need%20to%20estimate%20this%20metric%20%5Bdiscussion%5D%28https%3A//github.com/apache/superset/discussions/36250%29.%0A%0A-%20If%20you%20want%20to%20know%20the%20complexity%20%28number%20of%20charts%2C%20datasets%2C%20or%20tabs%29%2C%20you%20can%20use%20the%20API%20endpoints%3A%20%60/api/v1/dashboard/%3Cid_or_slug%3E/charts%60%2C%20%60/datasets%60%2C%20and%20%60/tabs%60%20to%20get%20counts%20of%20each%20component%20%5BAPI%20reference%5D%28https%3A//github.com/apache/superset/blob/master/superset/dashboards/api.py%29.%0A%0A-%20If%20you%20want%20a%20proxy%20for%20the%20dashboard%E2%80%99s%20export%20size%2C%20you%20can%20export%20the%20dashboard%20as%20a%20YAML%20file%20using%20the%20%60/export/%60%20endpoint%20and%20check%20the%20file%20size%20of%20the%20exported%20YAML%20%5BAPI%20reference%5D%28https%3A//github.com/apache/superset/blob/master/superset
 
/dashboards/api.py%29.%0A%0A-%20If%20you%20mean%20the%20rendered%20size%20%28width/height%20in%20pixels%29%2C%20there%20are%20frontend%20methods%20like%20%60getScrollSize%28%29%60%20that%20return%20the%20dashboard%E2%80%99s%20scrollable%20area%2C%20but%20this%20is%20only%20about%20the%20UI%2C%20not%20storage%20or%20complexity%20%5Bsource%5D%28https%3A//github.com/apache/superset/blob/master/superset-frontend/src/embedded/api.tsx%29.%0A%0ALet%20me%20know%20which%20metric%20you%E2%80%99re%20most%20interested%20in%20and%20I%20can%20help%20with%20more%20specific%20steps.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/37876)

GitHub link: 
https://github.com/apache/superset/discussions/37876#discussioncomment-15765058

----
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]

Reply via email to