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

Language features are unprecedentedly slow #72686

Closed
jessepinho opened this issue Apr 21, 2019 · 5 comments
Closed

Language features are unprecedentedly slow #72686

jessepinho opened this issue Apr 21, 2019 · 5 comments
Assignees
Labels
info-needed Issue requires more information from poster typescript Typescript support issues

Comments

@jessepinho
Copy link

Issue Type: Performance Issue

  1. Open a .tsx (TypeScript JSX) file.
  2. Place the mouse over any variable in the file — including one defined higher up in the same file.
    Expected behavior: it very quickly shows a tooltip with the typing of the variable.
    Actual behavior: it shows the tooltip after 30-40 seconds.

I tested this with extensions disabled. It's not reliably reproducible, unfortunately. It's hard to say whether it happens immediately after startup or later – it seems to go back and forth. (Sorry, I know that's not super helpful.)

I turned on verbose TSServer logging and was watching the logs and noticed that it seemed that there was a long delay between when I typed, moused over, etc. something in vscode, and when the logs would output more — almost as though the communication between vscode and the TS Server is slow. Let me know if I can provide more information, and I'm happy to provide logs privately.

VS Code version: Code 1.33.1 (51b0b28, 2019-04-11T08:22:55.268Z)
OS version: Darwin x64 18.5.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz (8 x 2700)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 1, 2, 3
Memory (System) 16.00GB (4.71GB free)
Process Argv --disable-extensions --usr-data-dir ./foo
Screen Reader no
VM 0%
Process Info
CPU %	Mem MB	   PID	Process
   17	   115	 85023	code main
    0	    66	 85027	   gpu-process
    0	   311	 85029	   window (tsconfig.json — vusik-natural-thing)
    0	    82	 85032	     extensionHost
    0	   492	 85037	       electron_node tsserver.js 
    0	    49	 85050	         electron_node typingsInstaller.js typesMap.js 
    0	    49	 85063	       /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/jsonServerMain --node-ipc --clientProcessId=85032
    0	    49	 85033	     watcherService
    0	    49	 85167	     searchService
    0	    98	 85035	   shared-process
    0	    82	 85267	   window (Issue Reporter)
    0	     0	 85272	   /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
Workspace Info
|  Window (tsconfig.json — vusik-natural-thing)
|    Folder (vusik-natural-thing): 154 files
|      File types: js(84) json(18) png(16) ts(13) tsx(10) mp3(2) lock(1) md(1)
|                  gitignore(1) babelrc(1)
|      Conf files: package.json(1) tsconfig.json(1) tslint.json(1)
|                  webpack.config.js(1) settings.json(1);
Extensions disabled
@ChuckyHelse
Copy link

I confirm that I am experiencing this as well with the Microsoft C/C++ add-on. This may thus be independent from the language server itself and be more related to the related Visual Studio Code framework itself.

@mjbvz
Copy link
Collaborator

mjbvz commented Apr 22, 2019

@ChuckyHelse File an issue against the C++ extension

@jessepinho Do you have @types/styled-components installed in your workspace under node_modules?

@jessepinho
Copy link
Author

jessepinho commented Apr 22, 2019 via email

@mjbvz
Copy link
Collaborator

mjbvz commented Apr 22, 2019

Yes, see DefinitelyTyped/DefinitelyTyped#34391

Please try upgrading the latest version of @types/styled-components and restarting VS Code to see if that fixes the performance issue

@mjbvz mjbvz added info-needed Issue requires more information from poster typescript Typescript support issues labels Apr 22, 2019
@jessepinho
Copy link
Author

I believe this fixed it! Thanks, @mjbvz ! Ahhh wow, that was such a pain.

will close this for now and reopen if I experience the issue further.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

3 participants