Skip to content

Text selection is very slow #19982

Closed
Closed

Description

@mosajjal
  • 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.

Activity

  1. bpasero commented on Feb 5, 2017

    @bpasero
    Contributor

    Ali (@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
  2. mosajjal commented on Feb 5, 2017

    @mosajjal
    Author

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

    CPU-20170205T220619.cpuprofile.txt

  3. mosajjal commented on Feb 5, 2017

    @mosajjal
    Author

    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

  4. alexdima commented on Feb 6, 2017

    @alexdima
    Member

    Ali (@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 ?

  5. added
    info-needed
    on Feb 6, 2017
  6. mosajjal commented on Feb 6, 2017

    @mosajjal
    Author

    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.

  7. mosajjal commented on Feb 6, 2017

    @mosajjal
    Author

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

  8. alexdima commented on Feb 6, 2017

    @alexdima
    Member

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

  9. added
    *caused-by-extension
    on Feb 6, 2017
  10. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*caused-by-extensioninfo-neededperf

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions