hedefalk / atom-vue

Vue component file syntax for Atom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

language-vue causes CPU usage spike

SKalt opened this issue · comments

Atom version: 1.30.0
package version: 0.23.1

I verified this by disabling all my installed non-core packages, then incrementally reactivating them. Toggling language-vue would cause a CPU usage spike.
screen shot 2018-09-10 at 11 34 04 am
The first spike is atom startup, then the plateau is when language-vue is activated.

Hi @SKalt.

Currently, our package is just a grammar package with a few snippets. Highlight rendering is handled by the core of Atom rather than this package. I suggest you to redo the experiment on several Vue files with different sizes and check the results.

Looking forward to any new comment.

Further experimentation determined activating both ide-vue and this package at the same time was the root cause of the cpu spike.

details in case future wanderers actually need this Activating the package causes the CPU spike the immediately when I open a vue file. Other diagnostics:
atom --version
# Atom    : 1.32.1
# Electron: 2.0.9
# Chrome  : 61.0.3163.100
# Node    : 8.9.3
atom --safe # disables all packages, eliminating the cpu spike
# at this point, I activate atom-vue and toggle ide-vue, facepalm, and write this reply

@SKalt Thanks for the update. Guess it's a normal situation when using ide-vue.

On its startup, ide-vue starts a vue-language-server which is responsible to all Vue-related features. This vue-language-server would scan all files for linting and error checking, which could really cause a CPU spike if in a large Vue project.