Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a decorateMarkerLayer function for minimap #735

Open
maxbrunsfeld opened this issue Dec 29, 2016 · 8 comments
Open

Implement a decorateMarkerLayer function for minimap #735

maxbrunsfeld opened this issue Dec 29, 2016 · 8 comments

Comments

@maxbrunsfeld
Copy link

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 atom/atom#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?

@UziTech
Copy link
Collaborator

UziTech commented Nov 21, 2020

@maxbrunsfeld if you want to create a pr that would be very helpful.

@aminya
Copy link
Collaborator

aminya commented Dec 10, 2020

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

@UziTech
Copy link
Collaborator

UziTech commented Dec 11, 2020

It looks like decorateMarkerLayer is still experimental in Atom. @maxbrunsfeld do you know when it will be stable?

@aminya
Copy link
Collaborator

aminya commented Dec 11, 2020

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

@UziTech
Copy link
Collaborator

UziTech commented Dec 11, 2020

Oops 🤦‍♂️

@aminya
Copy link
Collaborator

aminya commented Dec 11, 2020

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

@UziTech
Copy link
Collaborator

UziTech commented Dec 11, 2020

@aminya does that mean this issue should be closed?

@aminya
Copy link
Collaborator

aminya commented Dec 11, 2020

If we can transfer this to minimap repo, we can work on it more. The code for minimap can be optimized more.

@UziTech UziTech transferred this issue from atom-minimap/minimap-find-and-replace Dec 12, 2020
@aminya aminya changed the title Observing individual markers causes poor performance in large files Implement a decorateMarkerLayer function for minimap Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants