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

Syntax highlighting became much slower with 'v0.39.2' and later #1663

Closed
onurusluca opened this issue Aug 2, 2022 · 7 comments
Closed

Syntax highlighting became much slower with 'v0.39.2' and later #1663

onurusluca opened this issue Aug 2, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@onurusluca
Copy link

onurusluca commented Aug 2, 2022

Related to #1615 also probably to #1600

Creating a more detailed and different issue on @johnsoncodehk request.

After some tests I found that with v0.39.2 Volar got very slow and sluggish.

v0.39.2 and later:
slow

v0.39.1 and before (less than a second):
fast

This problem may be caused by a commit after d27d989 or later . Because all the commits after that are included in v0.39.2.

I am looking into it but it would be better if someone with more experience in Volar took a look at it.

Sharing some details for context:

VsCode: June 2022 (version 1.69)

Operating System:
Microsoft Windows 10 Home 64-bit
CPU:
Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz
Motherboard:
Alienware Alienware m17 R3 (U3E1)
RAM:
32.00 GB Unknown form factor Unknown 2667MHz
GPU:
Intel(R) UHD Graphics 1024 MB
NVIDIA GeForce RTX 2070 Super 4095 MB

System:
OS: Windows 10 10.0.19044
CPU: (16) x64 Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz
Memory: 18.41 GB / 31.77 GB
Binaries:
Node: 18.7.0 - C:\Program Files\nodejs\node.EXE
npm: 8.10.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.77)
Internet Explorer: 11.0.19041.1566

@onurusluca onurusluca changed the title Syntax highlighting became much slower with 'v0.39.2' Syntax highlighting became much slower with 'v0.39.2' and latter Aug 2, 2022
@onurusluca onurusluca changed the title Syntax highlighting became much slower with 'v0.39.2' and latter Syntax highlighting became much slower with 'v0.39.2' and later Aug 2, 2022
@johnsoncodehk johnsoncodehk added the bug Something isn't working label Aug 2, 2022
@johnsoncodehk
Copy link
Member

Thank to confirm the commit! GetDocumentVersionRequest is completely used for improve performance, it's removed because it don't have effect on my macbook now, maybe it just affect for windows. I will re-add it.

@onurusluca
Copy link
Author

onurusluca commented Aug 2, 2022

@johnsoncodehk Thanks for the quick reply. To be clear I don't know if GetDocumentVersionRequest causes the problem. It may be that commit or later.

I am more than happy to help testing anything.

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Aug 3, 2022

I found that d27d989 is released with v0.39.1, so it should not the reason.

I think 8673fa1 the most possible lead to this problem, please let me know if volar-0.39.5-alpha.2.vsix.zip can resolve the problem or not, this version try to revert that commit.

@onurusluca
Copy link
Author

@johnsoncodehk Hey! Thanks for the reply. I tried this version and it works fine. Not slow, just good, No problems afaic.
Took a look at 8673fa1 . I think diagnostics take some time so slows down the syntax highlighting.

@BryceBarbara
Copy link

I'm able to see a performance impact between v0.39.1 and v0.39.2 as well.

v0.39.1 v0.39.2
Code_9Fsx1mhVkf Code_HwYCxbFZ7D

@BryceBarbara
Copy link

Looks like v0.39.5-alpha.2 is also faster for me. I've recorded a gif of it just for sake of completeness:

Code_dpfdxhy7fy

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Aug 6, 2022

Thanks for the information, I'm not sure if 18b62d1 fixed this problem or not because I can't reproduce this problem on mac, please try v0.39.5 and let me know, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants