Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Scrolling and cursor movement are sluggish when there a large numbers of folds #2848

Closed

Description

@nathansobo

You can reproduce this problem by opening editor-spec.coffee and fold all, then scrolling or moving the cursor. I think it's because we're querying on-screen markers for decorations as we scroll, and folds cause there to be a ton of them.

Activity

  1. changed the title [-]Scrolling is sluggish when there a large numbers of folds[/-] [+]Scrolling and cursor movement are sluggish when there a large numbers of folds[/+] on Jul 9, 2014
  2. nathansobo commented on Jul 9, 2014

    @nathansobo
    ContributorAuthor

    Here's a flame graph of moving the cursor with everything folded in editor-spec.coffee. Looks like we spend a ton of time in _.deepContains.

    screenshot 2014-07-08 21 39 16

  3. nathansobo commented on Jul 9, 2014

    @nathansobo
    ContributorAuthor

    @benogle looks like lots of 'folded' decorations are stacking up for a ton of nested folds. In the case of this file, we're doing a deepContains on a 660-element array.

    • We should index decorations for each line by id rather than storing them in an array.
    • Maybe we should only retain 'folded' decorations for the outermost folds to reduce this crazy redundancy.
  4. lock commented on Jan 26, 2019

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  5. locked as resolved and limited conversation to collaborators on Jan 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions