issie
issie copied to clipboard
Issie DOM memory leak (now fixed)
Describe the bug
Issie pre-5.1.0 had a memory leak that caused slowdown and then crashing after long use. The leakage scales with edited sheet size so when editing a large sheet this slowdown happens after < 5 minutes.
Cause and Solution
- This went away after refactoring the draw block not to use a mutable reference to the last created DOM to manage scrolling.
- In the process of fixing this a lot of refactoring was done to reduce DOM listener and message dependence on
model
.
However - for the record - this was not a bug in the Issie code but introduced in a later release of React 17.
https://github.com/facebook/react/issues/27892
We should therefore find that the old code would also work if we could upgrade to React 18. This depends on upgrading to Elmish v4 which is on the TODO list but not urgent. React 18 has significant differences from 17.