Skip to content

Commit

Permalink
Patch highlight-selected's HighlightedAreaView to only highlight up t…
Browse files Browse the repository at this point in the history
…o 400 markers

Summary:
If this is unbounded, `highlightSelectionInEditor` can block significantly. In my tests, highlighting 100k nodes took about 10s.

Since the usefulness of this degrades past a handful of selections, patch it to limit the number of highlights to 400. This results in pauses anywhere from 50s-150s in extreme cases.

Reviewed By: aadisriram

Differential Revision: D13033448

fbshipit-source-id: 675e8fa0b15e8e960adc21e1a58e9aac24c9d265
  • Loading branch information
Will Binns-Smith authored and pelmers committed Nov 15, 2018
1 parent 4433a1a commit 8324cbd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions flow-libs/atom.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ declare class atom$PackageManager {
deactivatePackages(): Promise<void>,
deactivatePackage(name: string, suppressSerialization?: boolean): Promise<void>,
emitter: atom$Emitter,
loadedPackages: {[packageName: string]: atom$Package},
loadPackage(name: string): void,
loadPackages(): void,
serializePackage(pkg: atom$Package): void,
Expand Down

0 comments on commit 8324cbd

Please sign in to comment.