codemirror-minimap icon indicating copy to clipboard operation
codemirror-minimap copied to clipboard

Poor performance for drawLine

Open curran opened this issue 7 months ago • 3 comments

I adopted this extension, but then noticed that it causes substantial performance issues. I thought I'd drop a line here with what I noticed.

To reproduce: select some text, and hold down the arrow key so it selects more and more.

The updates take around 72ms.

image

Specifically, these two calls within the minimap extension:

measure and drawLine

image

Specifically, drawLine is not re-using DOM elements:

image

curran avatar Dec 30 '23 23:12 curran