caused a horrendous performance while loading the edit page.
It dumps the plolty object as a string via json.dumps and when the indent parameter is used formats it nice and pretty.
But the formatting in a textarea seems to be very slow when you have over 130k datapoints in your plotly data, causing the page to seemingly lag for several seconds.
Now we just skip the indentation alltogether and initially load the textarea with a one-line JSON string and then afterwards format the JSON via javascript in the form_base js block.
The introduced jinja filter
"to_json_no_extra_escapes(indent=2)"
caused a horrendous performance while loading the edit page. It dumps the plolty object as a string via json.dumps and when the indent parameter is used formats it nice and pretty. But the formatting in a textarea seems to be very slow when you have over 130k datapoints in your plotly data, causing the page to seemingly lag for several seconds.
Now we just skip the indentation alltogether and initially load the textarea with a one-line JSON string and then afterwards format the JSON via javascript in the form_base js block.