burr icon indicating copy to clipboard operation
burr copied to clipboard

Handle large state objects in the UI

Open skrawcz opened this issue 1 year ago • 1 comments

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

  1. 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.
  2. do some smart caching on the UI? or only store "deltas" between steps?
  3. do something else?

skrawcz avatar Mar 22 '24 21:03 skrawcz

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:

  1. Handle dataframes
  2. Handle pydantic models
  3. ...

This is dependent on #33

elijahbenizzy avatar Mar 23 '24 01:03 elijahbenizzy