As of this writing, there are two issues with sending #cellDiscarded messages that slow things down in a single rendering cycle:
- The message has too much information, including the type of cell etc. It only needs to reference an id.
- We are sending one message per each cell that is discarded in a rendering cycle. This gets to be grossly inefficient when we are, say, updating cells inside a giant table during one pass (could be thousands of separate messages).
Instead, we should restructure #cellDiscarded to instead be #cellsDiscarded which will simply pass an array of cell ids to remove per each cycle.
As of this writing, there are two issues with sending
#cellDiscardedmessages that slow things down in a single rendering cycle:Instead, we should restructure
#cellDiscardedto instead be#cellsDiscardedwhich will simply pass an array of cell ids to remove per each cycle.