Decorations implementation is inefficient
Created by: felixfbecker
The way decorations are implemented has perf problems.
On every decorations update, all decorations are removed by iterating all previous decorations and calling getCodeElementFromLineNumber()
for each and removing the element inside it with querySelector()
, then all the latest ones are iterated, with getCodeElementFromLineNumber()
called again. This is a lot of duplicate work if there are decorations that stayed the same.