@app.callback improvements? (Trigger component, same Output multiple times, callback without Output, serverside store / callback cache)

The simple example is what people seem to want to do (for example this):

  • Press a button
  • Calculate dataframe df server side, based on some selection in frontend
  • Save that df into temporary memory my-memory
  • Have multiple callbacks listening my-memory. Let’s say, there are 4 Graphs created and shown to user from 4 different callbacks.

In this case, when multiple callbacks listen to the my-memory, there will be normally many unnecessary HTTP requests for the server and sending (data with dcc.Store, session ID with ServerStore) back and forth. This all could, in theory, be short-circuited in such way that the session ID is only sent to the server once.

On local machine, perhaps quite negligible speed increase, but if you put your app to a slow cheap server (free tier heroku), I guess the speed gain should be visible. But yeah, some benchmarking and testing could be :ok_hand:t2: before implementation, to make sure there is really notable potential performance increase.