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

Deleting consecutive multiple cursors is very slow #42317

Closed
EFanZh opened this issue Jan 29, 2018 · 2 comments
Closed

Deleting consecutive multiple cursors is very slow #42317

EFanZh opened this issue Jan 29, 2018 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-core Editor basic functionality freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues verified Verification succeeded
Milestone

Comments

@EFanZh
Copy link
Contributor

EFanZh commented Jan 29, 2018

  • VSCode Version: Code 1.19.3 (7c4205b, 2018-01-25T10:36:34.867Z)
  • OS Version: Windows_NT x64 10.0.16299
  • Extensions: Extensions are disabled

Steps to Reproduce:

  1. Create a new text file with 4000 empty lines
  2. Put the cursor on the first line
  3. Scroll to bottom
  4. Alt + Click on the last line to add 3999 more cursors
  5. Press Delete key or Backspace key
  6. You should notice the deletion takes a lot of time

But if the cursors are not consecutive, deletion will be much faster.

To illustrate the problem:

If the cursors are positioned like this (| represents a cursor position):

|
|
|
|
|
|

The deletion will be very slow.

If the cursors are positioned like this (just by pressing Enter in the last case):


|

|

|

|

|

The deletion will be a lot faster.

@vscodebot vscodebot bot added editor editor-core Editor basic functionality labels Jan 29, 2018
@EFanZh EFanZh changed the title Deleting with multiple cursors separated by new lines is very slow Deleting consecutive multiple cursors is very slow Jan 29, 2018
@alexdima alexdima self-assigned this Jan 30, 2018
@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues and removed editor labels Apr 19, 2018
@alexdima
Copy link
Member

A lot of time is spent in the decorations tree and in the view model...

image

@isidorn
Copy link
Contributor

isidorn commented Apr 26, 2018

Verified this now takes 1 second. Which is good imho

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-core Editor basic functionality freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants