Skip to content

Sometimes Vetur is still very slow #2192

Closed
@lanyizi

Description

@lanyizi
  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: Windows
  • Vetur version: 0.26.1
  • VS Code version: 1.48.1

Problem

I've seen related issues like #1272 talking about calls to synchronizeHostData. I did not dig in too much, but I found that when validating sources and templates, calls such as getSemanticDiagnostics may call synchronizeHostData internally (link), and by a rudimentary profiling it looks like each validation will took ~300ms on my computer. When I'm writing code, js and template will be validated separately, so they might take something like 500 or 600ms in total.
I'm not sure if that's the cause of the issue since I didn't do an accurate profiling, but probably it will help.

const rawTemplateDiagnostics = templateService.getSemanticDiagnostics(templateFileFsPath);

...service.getSemanticDiagnostics(fileFsPath)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions