hyperformula
hyperformula copied to clipboard
Automatic upsizing, no automatic downsizing.
Description
Right now we upsize the sheet size whenever necessary:
const hf = HyperFormula.buildEmpty()
hf.setCellContents({sheet: 0, row: 100, col: 100}, 0)
console.log(hf.getSheetDimensions(0))
produces { width: 101, height: 101 }
however
hf.setCellContents({sheet: 0, row: 100, col: 100}, undefined)
console.log(hf.getSheetDimensions(0))
still produces { width: 101, height: 101 }
There is no easy way of de-allocating the sheet (if one uses dense mapping, this memory is actually allocated as an array), besides e.g. serializing and de-serializing of the engine (e.g. config update with no config change).
Still, this would be a non-trivial task to implement, and of negligible gain, so it should be rather reflected in a change to known limitations
.