Hi, I’m new to dash. I’m building an app to visualize result of a machine learning model. I’ve read share-data-between-callbacks and decided to use client side caching.
I saved the model data in a pickle file. I create a dcc.Upload on my app to read pickle data for a specific user and use dcc.Store to store data for that specific user. Since dcc.Store needs json format file, I use jsonpickle to convert my complex python object to json. Then I am using this stored data to generate several graphs (i.e. use in several callbacks). The callbacks are extremely slow. I found the problem possibly in serialization. Serializing my complex python instance to json takes about 10s whereas picking takes less than 1s.
I know pickle has a security issue but my app is designed for internal use. Is there any way to solve the serializing speed issue or improve my pipeline?
Thanks in advance.
Max
4 posts - 2 participants