Closed btabram closed 1 year ago
Thanks for the report and for the investigation @btabram. Glad you have a workaround! This is definitely something we should address. Ideally we'll be able to track down the memory leak (probably in Vega), but VlConvert should also track memory usage and potentially restart the runtime when it reaches a certain level to be more robust to this kind of scenario.
Hi, I'm aware this is quite niche but it's taken me a while to investigate this and I thought it was worth making an issue in case it saves someone else time in the future or is something which you think is worth fixing 🙂
Here's a minimal reproduction where I repeatedly create a png from a vega lite spec (5k rows) which was created with Altair, including calling
chart.interactive()
:The input is vega.json.zip (zipped to upload here) and the output is:
If I remove the
"params"
field (which I understand is related to interactivity) fromvega.json
then the memory usage is stable ~200MB. In my real usecase where there's a lot more data then I'm only able to create ~15 (different) pngs before hitting the out of memory error.Since realising that interactivity was part of the problem I've removed the
.interactive()
call from my code and so the impact of this bug is minimal. The.interactive()
call was a hang-over from an earlier version of my code and was no longer necessary but I hadn't expected it to cause problems.Thanks