ipysheet
ipysheet copied to clipboard
Questions about code design
I might be wrong, but I have the feeling that the code could be a lot faster than it is today. Whenever one cell attribute changes, we recompute the whole sheet. More than that, we make a deep copy of the data.
I also feel like adding the entire logic inside of the SheetModel
and the SheetView
could be wrong.
So, my questions are:
- Is it possible to make the changes of the sheet more specific to the event that happened? I mean, if I only change the value of one cell, is it possible to only change the sheet data for this cell specifically?
- Can we add cell logic (like events) inside of the
CellModel
, and would it make sense to have aCellView
?
Concerning my first question, there is a setDataAtCell method which makes it possible to specifically change the value of one cell. It also provides a way to update multiple cells at the same time, which could help when trying to update an entire cell range.
I guess this could be used from within a CellView
class?
I think handsontable always rerenders the whole table, so no way around it right?
I hope not. I don't see why it would need to rerender the whole table just for changing one cell value?