Skip to content

syntax check is very slow #6129

@tjx666

Description

@tjx666

Type: LanguageService

Describe the bug

Version: 1.49.0 (user setup)
Commit: e790b931385d72cf5669fcefc51cdf65990efa5d
Date: 2020-09-10T13:22:08.892Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041
Extension Version: v0.30.0-insiders4

Syntax check is very slow, maybe need 2~4 or more seconds but only a hello world project. UnLike javascript syntax check can complete within 1 second.

Steps to reproduce

  1. disable all extension except vscode-cpptools
  2. create a file test.cpp and paste the following code:
#include <iostream>

using namespace std;

int main()
{
	int arr[] = { 1, 2, 3, 4};
	cout << "hello world" << endl;
	return 0;
}
  1. remove the semicolon after endl.
  2. syntax check error will show after 2~4 second.
  3. insert semicolon after endl, you will see error disappear after even more seconds.

Expected behavior

Syntax check quick as VS and Clion within 1 second.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions