JetBrains / MPS-extensions

MPS-extensions aims to ease language development within MPS.
https://jetbrains.github.io/MPS-extensions/
Apache License 2.0
80 stars 49 forks source link

Line numbers: Improve performance #727

Closed alexanderpann closed 8 months ago

alexanderpann commented 8 months ago

This PR fixes https://github.com/JetBrains/MPS-extensions/issues/726

The left highlighter gets way too many relayout events which we can't influence, so we have to throttle the number of events. I've selected 250ms, which means that the line numbers only update 4 times per second or less. I've tried to create many new lines in the mbeddr documentation for testing and the update interval seems to be sufficient for small and large editors.