✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

How to properly create fig/dcc.Graph objects via multi-threading?

hey all, was wondering if there’s a conventional way to go about this.

I have several graphs, almost identical, just using different data.

This isn’t a problem until I try to add around 10, the “render time” takes about 3-5 seconds and only gets worse the more I try to add.

I tried to create each fig using its own thread, however it doesn’t seem to slow down the time it takes at all. Even though it seems to start creating the figs all at the same time. Ironically, it takes about 1.25x longer to create the figs via python’s threading.

Are there any examples out there floating around that go over how to handle this?

Thanks!