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

High CPU usage and high read IO usage #348

Closed
ChiHoc opened this issue Jul 21, 2017 · 10 comments
Closed

High CPU usage and high read IO usage #348

ChiHoc opened this issue Jul 21, 2017 · 10 comments

Comments

@ChiHoc
Copy link

ChiHoc commented Jul 21, 2017

Info

  • Platform: OSX 10.12.5
  • Vetur version: 0.9.1
  • VSCode version: 1.14.2

Problem

I got a high cpu usage and high read IO usage vetur process.

process
image

high read IO usage
image

high cpu usage
image

Reproducible Case

  1. Open a vue project. (224M, 24,110 files)
  2. Use "workbench.action.files.showOpenedFileInNewWindow" key and open a new window.
  3. Watch "Activity Monitor"
@gh67uyyghj
Copy link

#216

@octref
Copy link
Member

octref commented Jul 21, 2017

@octref octref closed this as completed Jul 21, 2017
@ChiHoc
Copy link
Author

ChiHoc commented Jul 22, 2017

It works and feel sorry to open a duplicate issue. Thank you. @eronaeon @octref

@ChiHoc
Copy link
Author

ChiHoc commented Jul 24, 2017

Um, it still seems happening when I open file in new window, even if exclude "dist" and include "src". ("src" is my vue project source dir)

image

image

@octref
Copy link
Member

octref commented Jul 24, 2017

Does that happen with Vetur disabled?

@octref octref reopened this Jul 24, 2017
@ChiHoc
Copy link
Author

ChiHoc commented Jul 25, 2017

It works well with Vetur disabled.

@ChiHoc
Copy link
Author

ChiHoc commented Jul 25, 2017

The key point that I open file in a new window, not a new tab.

@octref
Copy link
Member

octref commented Jul 25, 2017

If there is no repro case I can't help you.

Does Vetur work well for other projects like egoist/vuepack or the webpack template?
Can you try to modify them to cause this error? Or is the error just because of you having too much files in your workspace?

@ChiHoc
Copy link
Author

ChiHoc commented Jul 27, 2017

Here is the repro case.

Clone this demo project: https://github.com/bailicangdu/vue2-happyfri. ( 6.6 MB, 72 files)
image

Add jsconfig.json.
image

Open project in VSCode, and open a new window.
2017-07-27 12 36 20

@octref
Copy link
Member

octref commented Aug 5, 2017

I don't think it has anything to do with "Opening New Window". The problem is you are opening single vue file using a VSCode instance / window, without a workspace.

People have reported this issue before. Vetur cannot determine your tsconfig without a workspace.
Now we recommend always work on Vue project by opening the whole project as a workspace. But with the upcoming VSCode support for Multi-Folder workspace, I plan to look deeper into workspace and have better support for the two scenarios:

  • opening single vue file
  • opening multiple vue projects using Multi-Folder workspace

@octref octref closed this as completed in f76efae Sep 5, 2017
octref added a commit that referenced this issue Sep 5, 2017
fix #348, optimize single file CPU usage
octref pushed a commit that referenced this issue Nov 22, 2017
octref added a commit that referenced this issue Nov 22, 2017
fix #348, optimize single file CPU usage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants