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

Text selection is very slow #19982

Closed
mosajjal opened this issue Feb 5, 2017 · 7 comments
Closed

Text selection is very slow #19982

mosajjal opened this issue Feb 5, 2017 · 7 comments
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension info-needed Issue requires more information from poster perf

Comments

@mosajjal
Copy link

mosajjal commented Feb 5, 2017

  • VSCode Version:
    Version 1.9.0
    Commit 27240e7
    Date 2017-02-02T08:21:13.228Z
    Shell 1.4.6
    Renderer 53.0.2785.143
    Node 6.5.0

  • OS Version:
    Arch Linux, 4.4.42-1-lts

Steps to Reproduce:

  1. Open a big file (in my case ~8.5k lines)
  2. Try to select 20 lines with mouse drag
  3. See it taking 3-4 seconds with freezes.

I wonder it has something to do with the "selected word count" function being called each time a word is selected, which is shown in statusbar.

@bpasero bpasero added the perf label Feb 5, 2017
@bpasero
Copy link
Member

bpasero commented Feb 5, 2017

@mosajjal maybe you could run a CPU profile to see where most time is spend?

To create a CPU profile using developer tools in VS Code:

  • select Help > Toggle Developer Tools
  • click on Profiles
  • click the start button
  • do whatever you need to do to get the CPU spin high
  • wait for some time (10-20 seconds should be enough)
  • stop the profiling
  • click the save button and attach the output file to this issue

@mosajjal
Copy link
Author

mosajjal commented Feb 5, 2017

I did for 4-5 times. Here's the CPU profile

CPU-20170205T220619.cpuprofile.txt

@mosajjal
Copy link
Author

mosajjal commented Feb 5, 2017

looks like internal/process/next_tick.js is taking up some time. I'm not an expert on reading the profile but it sure looks like it

@alexdima
Copy link
Member

alexdima commented Feb 6, 2017

@mosajjal Indeed, most of the time is spent in $trySetDecorations. This is an API call that comes in from the extension host and my guess is that you have an extension that is creating spamming us with decorations.

Does the issue still occur when you launch VS Code w/ extensions disabled? From the command line: code --disable-extensions ?

@alexdima alexdima added the info-needed Issue requires more information from poster label Feb 6, 2017
@mosajjal
Copy link
Author

mosajjal commented Feb 6, 2017

yes. It got fixed after disabling extensions.
Although I haven't installed anything out of ordinary in my vscode.

image

I'll disable these extensions one by one to find the "rouge" one and will open issue in the extension's repository.

thanks, you can go ahead and close this one if you want. Or I can provide more feedback about which extension caused the hiccup.

@mosajjal
Copy link
Author

mosajjal commented Feb 6, 2017

ok I found the extension. It's the "Guides" which helps with python indentation.

@alexdima
Copy link
Member

alexdima commented Feb 6, 2017

Thank you for tracking it down. The best would be to let the extension author know about the perf issue in large files.

@alexdima alexdima closed this as completed Feb 6, 2017
@alexdima alexdima added the *caused-by-extension Issue identified to be caused by an extension label Feb 6, 2017
@mosajjal mosajjal mentioned this issue Feb 6, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension info-needed Issue requires more information from poster perf
Projects
None yet
Development

No branches or pull requests

3 participants