minimap
minimap copied to clipboard
Implement a decorateMarkerLayer function for minimap
When searching for common strings in a large file, clearing the search can take a long time because of the onDidDestroy
listeners registered on individual markers. Currently, Atom itself uses these listeners, but when https://github.com/atom/atom/pull/13516 lands, we will no longer need them, which will significantly improve the responsiveness of find-and-replace.
As part of testing that PR, I fired up this package, and I noticed that it prevents the performance improvement from taking affect because it also uses decorateMarker
with individual markers. Have you looked into switching to the more performant TextEditor.decorateMarkerLayer
API?
@maxbrunsfeld if you want to create a pr that would be very helpful.
Chaing the API from decorateMarker to decoraterMarkerLayer needs upstream changed. From what I see in the code, the calls are redirected to the minimap package
It looks like decorateMarkerLayer is still experimental in Atom. @maxbrunsfeld do you know when it will be stable?
It is not experimental. You are checking an old version of the documentation: https://flight-manual.atom.io/api/v1.53.0/TextEditor/#instance-decorateMarkerLayer
Oops 🤦♂️
I was not aware of this particular API and the fact that it is faster.
Minimap does not seem to use Atom's decoration API
But linter-ui-default does! I will need to create an issue there.
https://github.com/steelbrain/linter-ui-default/blob/242a5b234979890f8adb9b268e7437fd3fbb539e/lib/editor/index.js#L350
@aminya does that mean this issue should be closed?
If we can transfer this to minimap repo, we can work on it more. The code for minimap can be optimized more.