Bug description
I'm creating a very simple handlebar chart to test this component and I noticed that I have big delays to render it. It's rather fluid with 1 column, but when I add 3 column, the browser freeze during about 10 seconds, and after that, it is very slow. I think I have understood the problem, when I have one column, I choose the "aggregate" query mode, and I have only 18 rows to render, but if I choose "raw records", all records are displayed, so it freeze too.
My example :
<table class="events">
{{#each data}}
<tr>
<td class="icon"><!--<img src="/static/assets/images/superset-logo-horiz.png" />--></td>
<td class="content">
<dl>
<dt><strong>{{this.type_evt}}</strong></dt>
<dd></dd>
</dl>
</td>
</tr>
{{/each}}
</table>
So, I need server pagination for handlebars to avoid this, but I found this thread which indicates that the server pagination doesn't work on handlebar. Is there a workaround about that ?
I don't know how to use handlebars without server pagination, but I guess it isn't possible with good performance, or it requires a small dataset. Is it planned to add server pagination for the handlebars ?
Thank you.
Screenshots/recordings
No response
Superset version
5.0.0
Python version
3.9
Node version
16
Browser
Firefox
Additional context
No response
Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Comment From: dosubot[bot]
Rendering large datasets with Handlebars in Superset causes browser freezes and slowness because all records are fetched and rendered client-side, especially in "raw records" mode. Server-side pagination is not supported for Handlebars charts in Superset 5.0.0—the pagination option was recently removed due to incomplete implementation (see PR #34016). There are no built-in hooks or extension points in the Handlebars chart plugin for implementing server-side pagination or chunking data.
The only practical workarounds right now are to use "aggregate" query mode to reduce the number of rows, or to limit your dataset size before rendering. If you need to handle large datasets, consider using alternative visualization components like the Table chart (which has more advanced pagination options, though even these have reported issues in recent versions), or explore the Plotly plugin for dynamic and efficient rendering of large datasets—just note that Plotly currently does not support Superset's cross-filtering features (discussion).
There is no evidence of ongoing work or a roadmap item to add server-side pagination for Handlebars charts as of Superset 5.0.0. Any solution would likely require significant changes at the plugin or chart framework level.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other