burr
burr copied to clipboard
Handle large state objects in the UI
Problem
Large state objects will (a) kill the UI, and (b) make looking at data difficult.
Context
I have a large list of objects 1K+, that I am processing and iterating through. The UI needs to handle this case.
Possible Solutions
- limit what is returned from the backend. Allow people to dig in, and open up a specific modal if the object is of a certain type or size.
- do some smart caching on the UI? or only store "deltas" between steps?
- do something else?
Storing deltas between state is the right way to do this -- it also allows us to save storage, which for something like chat_history is moving from O(n^2) to O(n). That said, this won't solve everything. How to:
- Handle dataframes
- Handle pydantic models
- ...
This is dependent on #33