-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
volar code action on save is slow #3326
Comments
After remote investigation to the project, the project is loading 7xx vue files outside the current directory (And total ~1000 vue files), resulting in TS high overhead. External vue files are no longer automatically parsed after 1.8.2. |
Would you mind clarifying how did those external files ended up being referenced and parsed? Specific project configuration or plain bug in directory traversal? |
@johnsoncodehk What is the recommended way to "parse external files"? This change broke our monorepo config and we are getting these errors
|
@johnsoncodehk bumping the above question, as this is an issue for a monorepo setup. Currently, manually specifying includes seems like the only way out in a typical monorepo setup that doesn't only have a base tsconfig. Ideally, this behavior should be at the very least opt-out to bring it in line with with how other frameworks behave in ts monorepos. I understand that your own personal recommendation is to just keep one root tsconfig, or minimize the amount of tsconfigs. While this is appropriate for an open source package based monorepo where the goal is to distribute many packages from a shared code base, the typical enterprise monorepo is counter to that. There, you might have packages of varying configs (e.g. node backend, vue frontend, internal libs, compiled libs, etc...) and so a single ts config is typically not appropriate. Ideally, Volar would parse files that are either in tsconfig paths (for integrated monorepos) or workspace linked dependencies (for package based monorepos). |
I had been staying at 1.8.1 for long time..., and just disable the code action |
Just a suggestion, could an option be added to prevent volar from engaging on a save action? I can't find a setting for this. |
After set
"vue.codeActions.enabled": false
, the save operation became very fast.Seems there is no way to check the vue code action costs now.
After I test, I found if the ts types is resolved completed, the volar code actions would be fast.
Seems the volar code action rely on ts type info...
The text was updated successfully, but these errors were encountered: