Get help from the marimo community

Updated 4 weeks ago

Notebook crashes when going from app/run to edit mode

Hey, I have a notebook that loads data (~1.6M rows), has some UI elements for filtering that dataset and creates some altair plots. I find that when I go from app mode to edit mode the notebook first shows as blank, then tries to render elements then crashes and finally if I refresh the page it will reconnect and display things properly

Any clue on what could be going on? How can I figure out what's the culprit here?
M
l
5 comments
it could be sending all those points to the frontend (via altair), which can be pretty expensive and crash the browser
are you wraping the chart in mo.ui.altair_chart? this should load a .csv file, which you can look in the browser network devtools so see the size?

you may also consider vegafusion , which does some pre-aggregation server-side
Let me see! I am using vegafusion already and I am not currently using mo.ui.altair_chart, just plain altair charts, does using it improve performance of charts?
It will over vanilla Altair but not over vegefusion (unless you are using a non-aggregated view like scatter)
I see, I saw actually a Vega/Vega-lite error in the browser devtools, I'll paste it here.

What's odd as well is that sometimes when switching between run and edit and/or reloading my notebook I lose some of my latest edits despite having auto-save on
Add a reply
Sign up and join the conversation on Discord