handsontable
handsontable copied to clipboard
[9.0.0+] Handsontable init time is clearly longer with new Formulas plugin
Description
I've checked the performance of the new Formula plugin and didn't found any issues except that the HoT initialization delay time increased from several to several times longer compared to the previous implementation. The bigger dataset, the slower the HoT initializes. The similar results can be see using the loadData method.
v8.4.0: Init takes ~270 ms loadData takes ~207 ms
v9.0.0: Init takes ~432 ms loadData takes ~320 ms
Edit: After investigation the issue, it seems that the bottleneck mostly sits in the HF engine.
const DEFAULT_SETTINGS = {
binarySearchThreshold: 20,
matrixDetection: false,
matrixDetectionThreshold: 100,
useColumnIndex: false,
useStats: false,
evaluateNullToZero: true,
precisionEpsilon: 1e-13,
precisionRounding: 14,
smartRounding: true,
leapYear1900: true,
nullDate: {
year: 1899,
month: 12,
day: 31
},
nullYear: 30,
dateFormats: ['DD/MM/YYYY', 'DD/MM/YY'],
timeFormats: ['hh:mm', 'hh:mm:ss.sss'],
matchWholeCell: true,
useRegularExpressions: false,
useWildcards: true,
functionArgSeparator: ',',
thousandSeparator: '',
decimalSeparator: '.',
language: 'enGB',
};
const data = Handsontable.helper.createSpreadsheetData(1000, 1000);
console.time('hf');
HyperFormula.buildFromArray(data, DEFAULT_SETTINGS);
console.timeEnd('hf');
// Gives me about 7s
Demo
https://jsfiddle.net/budnix/Lgj9erk1/ 8.4.0 https://jsfiddle.net/budnix/ak37jwyr/ 9.0.0
Your environment
- Handsontable version: 9.0.0
- Browser Name and version: -
- Operating System: -
I'm using the last version and hyperformula is very slow.
We have a number of issues in HyperFormula related to improving performance, some of which are being worked on currently. The performance should be re-verified after completing some of these issues:
In the scope of the next release:
- https://github.com/handsontable/hyperformula/issues/896
- https://github.com/handsontable/hyperformula/issues/973
- https://github.com/handsontable/hyperformula/issues/1011
Other:
- https://github.com/handsontable/hyperformula/issues/1006
- https://github.com/handsontable/hyperformula/issues/872
- https://github.com/handsontable/hyperformula/issues/876
- https://github.com/handsontable/hyperformula/issues?q=is%3Aissue+label%3APerformance+is%3Aopen+