Performance on raspberry pi

Hello,
I have a Dash project, which runs on a Raspberry Pi.
the main Structure is to read data then save it into db then plot it all a once in one long Callback.
I have tried to let the program overnight for about 10 hours, but I get for more than 10k debugs (server not response).
I have long callback manger from the example in this Long Callbacks | Dash for Python Documentation | Plotly , but it did not help too much!
I need it to be updated once per second.
Is there a way to improve the performance?
Thanks