简体   繁体   中英

PhpStorm extremely slow while editing vue.js files

I'm using PhpStorm 2017.1.4 with the vue.js plugin. The problem I have is: this plugin is extremely slow and makes coding impossible as you type and you don't see what you type only with 1 to 2 seconds lag. It takes 95% of allocated memory. It takes 50% of the CPU usage.

The project I'm working on is new and I have only one file open of less than 70 lines.

Settings offers to install for vue.js plugin v171.4424.63 I tried to install an earlier version of the plugin v171.3780.63 from https://plugins.jetbrains.com/plugin/9442-vue-js but the result is the same.

Installing more recent versions wasn't supported by PhpStorm and showed it in red with the message "plugin is not compatible with current PhpStorm installation".

I already opened an issue on https://youtrack.jetbrains.com/issue/WI-36715 . But what do I do until they fix the issue? code on notepad?

Is there anything I can do to speed things up?

Did this and solved my problem

Tell php storm to ignore the /public dir for indexing.

  1. Right-click a dir (like public , or public/js ),
  2. Choose mark directory as and select excluded .
  3. PHPStorm will no longer index it when changes are made.

I had similar issue and for me the problem was with multiple copies of generated javascript files by Encore / Webpack in public folder. Therefore, PhpStorm indexed all duplicates and was using all the duplicates for code completion / code navigation.

Excluding the folder with generated javascript files ( mark directory as excluded in PhpStorm ) helped!

(well, I should have excluded such folder long time ago)...

I have just found what was making my specific project so slow and not other ones: I am using Laravel mix tool for versioning my js and sass files. I had more than 200 generated copies of each stored in the public directory. Edit Even if I have added public\\js and public\\css to the .gitignore, phpStorm VCS (version control) PhpStorm was taking almost all ressource to index these files. Now I deleted the unused files, the plugin is fast as it should be.

The question that remains now is why laravel mix is not deleting the previous versions of built css and js files?

I have never used the php storm plugin but maybe if you don't need the full IDE support you should consider using an editor like Sublime text or Visual studio code or Atom. They are lightning fast compared to an IDE.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM