hyperformula icon indicating copy to clipboard operation
hyperformula copied to clipboard

Document how to optimize formulas

Open warpech opened this issue 3 years ago • 1 comments

Discussed in https://github.com/handsontable/hyperformula/discussions/871

Originally posted by rackuka December 8, 2021 I have excel workbook which I parse and provide to HyperFormula as dictionary (Record<string, string[][]>) of array of arrays. It takes 30-35 seconds for the buildFromSheets to complete loading. Profiling shows that the most of the time is consumed by buildGraph.

This time is not acceptable at all for my case where hyperformula is supposed to serve as calculation engine in server environment with the workbook be the calculation model. Latency for processing calculation request should exceed 1 second (including network latencies). So appears that loading the workbook every time is not an option (35 seconds to load).

I would appreciate for the advise as to how to improve overall time of buildFromSheets (if possible at all).

warpech avatar Feb 09 '22 17:02 warpech

A comment in the discussion linked above contains performance tips for making formulas cheaper for the AST parser. These tips should be added into the docs.

warpech avatar Feb 09 '22 17:02 warpech