Skip to content

doApplyEdits Lines inserted using splice #351

@cdruine

Description

@cdruine

monaco-editor npm version: 0.8.1
Browser:chrome
OS: windows
Using splice for each lines in _doApplyEdits line 630
this._lines.splice(newLineNumber - 1, 0, new ModelLine(newLineNumber, op.lines[j], tabSize));
Could you use just do one insert with all lines because when i insert more than 5000 lines (a collapse/expand "button like" with decoration) if there is text, but no lines, after the insert point it take less than 1 second but when there's even an empty line after the insert point it took more than 5 seconds ?
I change it myself and even with a lot of lines after the insert point, it's less than 1 seconde to do the insert.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions