The history is sometimes used in plugin import methods: this.history.update(...)
There are 2 main reason to do that:
data structures are typed as readonly (to force using the history when handling commands)
it's easier since it creates all intermediary objects itself this.history.update("myData", sheetId, pivotId, value), if myData is empty, it will creates intermediary objects with keys sheetId and pivotId: myData: { [sheetId]: { [pivotId]: data } }
At import however, keeping track of the changes is useless. They are currently aggregated in the changes array, but never used.
This commit improves loading time of the large number data set by ~17%
Description:
The history is sometimes used in plugin
import
methods:this.history.update(...)
There are 2 main reason to do that:
this.history.update("myData", sheetId, pivotId, value)
, ifmyData
is empty, it will creates intermediary objects with keyssheetId
andpivotId
:myData: { [sheetId]: { [pivotId]: data } }
At import however, keeping track of the changes is useless. They are currently aggregated in the
changes
array, but never used.This commit improves loading time of the large number data set by ~17%
Before: 1353ms After: 1116ms
(averages over 8 runs) Task: : 4083517
review checklist
Forward-Port-Of: odoo/o-spreadsheet#4727