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

vetur works slow via SAMBA #507

Closed
3 tasks done
SidKwok opened this issue Nov 1, 2017 · 12 comments
Closed
3 tasks done

vetur works slow via SAMBA #507

SidKwok opened this issue Nov 1, 2017 · 12 comments

Comments

@SidKwok
Copy link

SidKwok commented Nov 1, 2017

Info

  • Platform: macOS
  • Vetur version: 0.10.1
  • VS Code version: 1.17.2

Problem

I access my .vue files from a headless Centos Linux VM to my local macOS, and all the feature vetur provides such as emmet and IntelliSense can't work.

for example, I type few characters and except the IntelliSense, but it comes out after one minute:

1509503651187
6c3ee1a76fe5cf321dc927655a9667cb

And the error I type a minute before just come out in an unpredictable moment.

But vetur works fine in my local.

Reproducible Case

  1. install vetur
  2. jsconfig.json
{
    "include": [
        "./src/**/*"
    ]
}
  1. Try to access your .vue files via SAMBA
@SidKwok
Copy link
Author

SidKwok commented Nov 1, 2017

Note that I have almost 100 .vue files in src, and when I put only one .vue file in src, the IntelliSense comes out in few seconds (still feel delay). But vscode-eslint and typescript-styled-plugin seem ok when I access file via SAMBA.

@HerringtonDarkholme
Copy link
Member

I don't think vetur's script implementation digress much from tsserver. In fact, our implementation is much simpler (and of course more limited).

The performance bottleneck is alleged to be file system access. Thus in https://github.com/vuejs/vetur/blob/master/server/src/modes/script/serviceHost.ts this file.

I suggest you can try plain TypeScript completion. That should be as slow as vetur. If not, I don't know what we can do here...

@SidKwok
Copy link
Author

SidKwok commented Nov 8, 2017

yup. It should be the file system access issue. But path itellisense works fine, it seems that it also needs to due with the file system issue.

@SidKwok SidKwok closed this as completed Nov 8, 2017
@w1ndy
Copy link

w1ndy commented Jan 26, 2018

I'm also experiencing the same issue... Intellisense becomes very laggy with TypeScript in Vue files over samba. However normal TypeScript files work just fine...

@HerringtonDarkholme
Copy link
Member

@w1ndy can you reproduce it outside Samba?

@w1ndy
Copy link

w1ndy commented Jan 26, 2018

@HerringtonDarkholme
It's reproducible without Samba... Actually native TypeScript files do have some lags, but not as serious as Vue files. For example, if I remove a few letters by pressing a few backspaces very quickly from the end of "testObject.testFunction", which becomes "testObject.testFun", it seems that native TypeScript files will cancel error detection in between and immediately throw errors complaining that testFun is not found on testObject. However, Vue files will throw errors one by one complaining that testFunctio, testFuncti, testFunct not found on testObject...

@w1ndy
Copy link

w1ndy commented Jan 26, 2018

Another bug related to TypeScript is that if I change declarations in a native TypeScript file, which is imported by a Vue file, I have to restart VSCode to get the Vue file to recognize those changes...

@HerringtonDarkholme
Copy link
Member

@w1ndy Thanks for reporting. Would you kindly provide the project you observe lagging? It would be very helpful for us to debug/understand the issue.

For declaration non detected by vetur, it is a long standing problem. #355

@w1ndy
Copy link

w1ndy commented Jan 26, 2018

@HerringtonDarkholme
Sorry I can't disclose the source code right now, and I wasn't able to reproduce it with a small project... I wonder whether a CPU profile will be helpful? This CPU profile shows the activity when I was typing axisLayoutU after this.layout.. The profile ended shortly after the error was gone.

@HerringtonDarkholme
Copy link
Member

I inspected the CPU profile but cannot find Vetur related performance bottleneck. I can only see tslint-vue's call trace.

This is probably because Vetur's heavy work is done on Vue language server.

@octref Do you know a quick way to profile server?

@w1ndy on the other hand, you can read how to setup local extension development. https://github.com/vuejs/vetur/blob/master/docs/CONTRIBUTING.md#code

Clone the repo, install deps, and debugging in vscode can help you get profiling.

@octref
Copy link
Member

octref commented Jan 26, 2018

@HerringtonDarkholme I don't think there is a documented way to do it. I'll try passing debug params to LS initialization and try attaching Chrome debugger to it.

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

4 participants