Can
Be Better

解决phpstorm卡顿的问题

案例一:加载了过多的模块

电脑配置i5+8G内存。依旧会出现phpstorm卡死的情况,经过排查发现是node_modules目录中的模块非常多,所以就卡死了,所以我们要去把这个目录排除。

可以在项目设置中的directoies的目录属性,以使得phpstorm更好的工作。
可以将目录分为4种类型tests,sources,excluded,resource root。
如果觉得每次配置麻烦,可以将.idea目录中的you-project-name.iml文件保存,新建项目时覆盖过去,以下提供一个laravel框架的目录配置。
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
  <component name="NewModuleRootManager">
    <content url="file://$MODULE_DIR$">
      <sourceFolder url="file://$MODULE_DIR$/app" isTestSource="false" packagePrefix="App\" />
	  <sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/anlutro/l4-settings" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/arcanedev/log-viewer" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/arcanedev/support" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/bacon/bacon-qr-code" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/barryvdh/laravel-debugbar" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/barryvdh/laravel-ide-helper" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/barryvdh/reflection-docblock" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/bican/roles" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/classpreloader/classpreloader" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/dnoegel/php-xdg-base-dir" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/annotations" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/cache" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/inflector" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/instantiator" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/lexer" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/ender/laravel-ueditor" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/fzaninotto/faker" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/guzzle/guzzle" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/guzzle" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/promises" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/psr7" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/hamcrest/hamcrest-php" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/hieu-le/active" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/ignited/laravel-omnipay" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/intervention/image" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/itbdw/laravel-storage-qiniu" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/jakub-onderka/php-console-color" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/jakub-onderka/php-console-highlighter" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/jeremeamia/SuperClosure" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/jlapp/swaggervel" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/kbwebs/multiauth" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/laracasts/flash" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/laravel/framework" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/league/flysystem" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/lokielse/omnipay-alipay" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/maximebf/debugbar" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/mews/captcha" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/mockery/mockery" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/monolog/monolog" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/mtdowling/cron-expression" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/nesbot/carbon" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/nikic/php-parser" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/omnipay/common" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/overtrue/laravel-wechat" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/overtrue/socialite" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/overtrue/wechat" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/paragonie/random_compat" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-common" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-docblock" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/type-resolver" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/phpspec/prophecy" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-text-template" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-timer" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-token-stream" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/phpunit" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/phpunit-mock-objects" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/pimple/pimple" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/predis/predis" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/psr/container" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-message" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/psr/log" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/psy/psysh" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/qiniu/php-sdk" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/comparator" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/diff" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/environment" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/exporter" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/global-state" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/version" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/simplesoftwareio/simple-qrcode" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/swiftmailer/swiftmailer" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/class-loader" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/console" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/css-selector" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/debug" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/dom-crawler" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/finder" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-foundation" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-kernel" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php56" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-util" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/process" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/psr-http-message-bridge" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/routing" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/var-dumper" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/yaml" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/vlucas/phpdotenv" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/webmozart/assert" />
      <excludeFolder url="file://$MODULE_DIR$/vendor/zircote/swagger-php" />
	  <excludeFolder url="file://$MODULE_DIR$/node_modules" />
    </content>
    <orderEntry type="inheritedJdk" />
    <orderEntry type="sourceFolder" forTests="false" />
    <orderEntry type="module-library">
      <library name="PHARS">
        <CLASSES>
          <root url="phar://$MODULE_DIR$/composer.phar/" />
        </CLASSES>
        <SOURCES>
          <root url="phar://$MODULE_DIR$/composer.phar/" />
        </SOURCES>
      </library>
    </orderEntry>
    <orderEntry type="module-library">
      <library name="PHP" type="php">
        <CLASSES>
          <root url="file://$MODULE_DIR$/vendor/anlutro/l4-settings" />
          <root url="file://$MODULE_DIR$/vendor/arcanedev/log-viewer" />
          <root url="file://$MODULE_DIR$/vendor/arcanedev/support" />
          <root url="file://$MODULE_DIR$/vendor/bacon/bacon-qr-code" />
          <root url="file://$MODULE_DIR$/vendor/barryvdh/laravel-debugbar" />
          <root url="file://$MODULE_DIR$/vendor/barryvdh/laravel-ide-helper" />
          <root url="file://$MODULE_DIR$/vendor/barryvdh/reflection-docblock" />
          <root url="file://$MODULE_DIR$/vendor/bican/roles" />
          <root url="file://$MODULE_DIR$/vendor/classpreloader/classpreloader" />
          <root url="file://$MODULE_DIR$/vendor/composer" />
          <root url="file://$MODULE_DIR$/vendor/dnoegel/php-xdg-base-dir" />
          <root url="file://$MODULE_DIR$/vendor/doctrine/annotations" />
          <root url="file://$MODULE_DIR$/vendor/doctrine/cache" />
          <root url="file://$MODULE_DIR$/vendor/doctrine/inflector" />
          <root url="file://$MODULE_DIR$/vendor/doctrine/instantiator" />
          <root url="file://$MODULE_DIR$/vendor/doctrine/lexer" />
          <root url="file://$MODULE_DIR$/vendor/ender/laravel-ueditor" />
          <root url="file://$MODULE_DIR$/vendor/fzaninotto/faker" />
          <root url="file://$MODULE_DIR$/vendor/guzzle/guzzle" />
          <root url="file://$MODULE_DIR$/vendor/guzzlehttp/guzzle" />
          <root url="file://$MODULE_DIR$/vendor/guzzlehttp/promises" />
          <root url="file://$MODULE_DIR$/vendor/guzzlehttp/psr7" />
          <root url="file://$MODULE_DIR$/vendor/hamcrest/hamcrest-php" />
          <root url="file://$MODULE_DIR$/vendor/hieu-le/active" />
          <root url="file://$MODULE_DIR$/vendor/ignited/laravel-omnipay" />
          <root url="file://$MODULE_DIR$/vendor/intervention/image" />
          <root url="file://$MODULE_DIR$/vendor/itbdw/laravel-storage-qiniu" />
          <root url="file://$MODULE_DIR$/vendor/jakub-onderka/php-console-color" />
          <root url="file://$MODULE_DIR$/vendor/jakub-onderka/php-console-highlighter" />
          <root url="file://$MODULE_DIR$/vendor/jeremeamia/SuperClosure" />
          <root url="file://$MODULE_DIR$/vendor/jlapp/swaggervel" />
          <root url="file://$MODULE_DIR$/vendor/kbwebs/multiauth" />
          <root url="file://$MODULE_DIR$/vendor/laracasts/flash" />
          <root url="file://$MODULE_DIR$/vendor/laravel/framework" />
          <root url="file://$MODULE_DIR$/vendor/league/flysystem" />
          <root url="file://$MODULE_DIR$/vendor/lokielse/omnipay-alipay" />
          <root url="file://$MODULE_DIR$/vendor/maximebf/debugbar" />
          <root url="file://$MODULE_DIR$/vendor/mews/captcha" />
          <root url="file://$MODULE_DIR$/vendor/mockery/mockery" />
          <root url="file://$MODULE_DIR$/vendor/monolog/monolog" />
          <root url="file://$MODULE_DIR$/vendor/mtdowling/cron-expression" />
          <root url="file://$MODULE_DIR$/vendor/nesbot/carbon" />
          <root url="file://$MODULE_DIR$/vendor/nikic/php-parser" />
          <root url="file://$MODULE_DIR$/vendor/omnipay/common" />
          <root url="file://$MODULE_DIR$/vendor/overtrue/laravel-wechat" />
          <root url="file://$MODULE_DIR$/vendor/overtrue/socialite" />
          <root url="file://$MODULE_DIR$/vendor/overtrue/wechat" />
          <root url="file://$MODULE_DIR$/vendor/paragonie/random_compat" />
          <root url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-common" />
          <root url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-docblock" />
          <root url="file://$MODULE_DIR$/vendor/phpdocumentor/type-resolver" />
          <root url="file://$MODULE_DIR$/vendor/phpspec/prophecy" />
          <root url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" />
          <root url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" />
          <root url="file://$MODULE_DIR$/vendor/phpunit/php-text-template" />
          <root url="file://$MODULE_DIR$/vendor/phpunit/php-timer" />
          <root url="file://$MODULE_DIR$/vendor/phpunit/php-token-stream" />
          <root url="file://$MODULE_DIR$/vendor/phpunit/phpunit" />
          <root url="file://$MODULE_DIR$/vendor/phpunit/phpunit-mock-objects" />
          <root url="file://$MODULE_DIR$/vendor/pimple/pimple" />
          <root url="file://$MODULE_DIR$/vendor/predis/predis" />
          <root url="file://$MODULE_DIR$/vendor/psr/container" />
          <root url="file://$MODULE_DIR$/vendor/psr/http-message" />
          <root url="file://$MODULE_DIR$/vendor/psr/log" />
          <root url="file://$MODULE_DIR$/vendor/psy/psysh" />
          <root url="file://$MODULE_DIR$/vendor/qiniu/php-sdk" />
          <root url="file://$MODULE_DIR$/vendor/sebastian/comparator" />
          <root url="file://$MODULE_DIR$/vendor/sebastian/diff" />
          <root url="file://$MODULE_DIR$/vendor/sebastian/environment" />
          <root url="file://$MODULE_DIR$/vendor/sebastian/exporter" />
          <root url="file://$MODULE_DIR$/vendor/sebastian/global-state" />
          <root url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" />
          <root url="file://$MODULE_DIR$/vendor/sebastian/version" />
          <root url="file://$MODULE_DIR$/vendor/simplesoftwareio/simple-qrcode" />
          <root url="file://$MODULE_DIR$/vendor/swiftmailer/swiftmailer" />
          <root url="file://$MODULE_DIR$/vendor/symfony/class-loader" />
          <root url="file://$MODULE_DIR$/vendor/symfony/console" />
          <root url="file://$MODULE_DIR$/vendor/symfony/css-selector" />
          <root url="file://$MODULE_DIR$/vendor/symfony/debug" />
          <root url="file://$MODULE_DIR$/vendor/symfony/dom-crawler" />
          <root url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher" />
          <root url="file://$MODULE_DIR$/vendor/symfony/finder" />
          <root url="file://$MODULE_DIR$/vendor/symfony/http-foundation" />
          <root url="file://$MODULE_DIR$/vendor/symfony/http-kernel" />
          <root url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
          <root url="file://$MODULE_DIR$/vendor/symfony/polyfill-php56" />
          <root url="file://$MODULE_DIR$/vendor/symfony/polyfill-util" />
          <root url="file://$MODULE_DIR$/vendor/symfony/process" />
          <root url="file://$MODULE_DIR$/vendor/symfony/psr-http-message-bridge" />
          <root url="file://$MODULE_DIR$/vendor/symfony/routing" />
          <root url="file://$MODULE_DIR$/vendor/symfony/translation" />
          <root url="file://$MODULE_DIR$/vendor/symfony/var-dumper" />
          <root url="file://$MODULE_DIR$/vendor/symfony/yaml" />
          <root url="file://$MODULE_DIR$/vendor/vlucas/phpdotenv" />
          <root url="file://$MODULE_DIR$/vendor/webmozart/assert" />
          <root url="file://$MODULE_DIR$/vendor/zircote/swagger-php" />
        </CLASSES>
        <SOURCES>
          <root url="file://$MODULE_DIR$/vendor/anlutro/l4-settings" />
          <root url="file://$MODULE_DIR$/vendor/arcanedev/log-viewer" />
          <root url="file://$MODULE_DIR$/vendor/arcanedev/support" />
          <root url="file://$MODULE_DIR$/vendor/bacon/bacon-qr-code" />
          <root url="file://$MODULE_DIR$/vendor/barryvdh/laravel-debugbar" />
          <root url="file://$MODULE_DIR$/vendor/barryvdh/laravel-ide-helper" />
          <root url="file://$MODULE_DIR$/vendor/barryvdh/reflection-docblock" />
          <root url="file://$MODULE_DIR$/vendor/bican/roles" />
          <root url="file://$MODULE_DIR$/vendor/classpreloader/classpreloader" />
          <root url="file://$MODULE_DIR$/vendor/composer" />
          <root url="file://$MODULE_DIR$/vendor/dnoegel/php-xdg-base-dir" />
          <root url="file://$MODULE_DIR$/vendor/doctrine/annotations" />
          <root url="file://$MODULE_DIR$/vendor/doctrine/cache" />
          <root url="file://$MODULE_DIR$/vendor/doctrine/inflector" />
          <root url="file://$MODULE_DIR$/vendor/doctrine/instantiator" />
          <root url="file://$MODULE_DIR$/vendor/doctrine/lexer" />
          <root url="file://$MODULE_DIR$/vendor/ender/laravel-ueditor" />
          <root url="file://$MODULE_DIR$/vendor/fzaninotto/faker" />
          <root url="file://$MODULE_DIR$/vendor/guzzle/guzzle" />
          <root url="file://$MODULE_DIR$/vendor/guzzlehttp/guzzle" />
          <root url="file://$MODULE_DIR$/vendor/guzzlehttp/promises" />
          <root url="file://$MODULE_DIR$/vendor/guzzlehttp/psr7" />
          <root url="file://$MODULE_DIR$/vendor/hamcrest/hamcrest-php" />
          <root url="file://$MODULE_DIR$/vendor/hieu-le/active" />
          <root url="file://$MODULE_DIR$/vendor/ignited/laravel-omnipay" />
          <root url="file://$MODULE_DIR$/vendor/intervention/image" />
          <root url="file://$MODULE_DIR$/vendor/itbdw/laravel-storage-qiniu" />
          <root url="file://$MODULE_DIR$/vendor/jakub-onderka/php-console-color" />
          <root url="file://$MODULE_DIR$/vendor/jakub-onderka/php-console-highlighter" />
          <root url="file://$MODULE_DIR$/vendor/jeremeamia/SuperClosure" />
          <root url="file://$MODULE_DIR$/vendor/jlapp/swaggervel" />
          <root url="file://$MODULE_DIR$/vendor/kbwebs/multiauth" />
          <root url="file://$MODULE_DIR$/vendor/laracasts/flash" />
          <root url="file://$MODULE_DIR$/vendor/laravel/framework" />
          <root url="file://$MODULE_DIR$/vendor/league/flysystem" />
          <root url="file://$MODULE_DIR$/vendor/lokielse/omnipay-alipay" />
          <root url="file://$MODULE_DIR$/vendor/maximebf/debugbar" />
          <root url="file://$MODULE_DIR$/vendor/mews/captcha" />
          <root url="file://$MODULE_DIR$/vendor/mockery/mockery" />
          <root url="file://$MODULE_DIR$/vendor/monolog/monolog" />
          <root url="file://$MODULE_DIR$/vendor/mtdowling/cron-expression" />
          <root url="file://$MODULE_DIR$/vendor/nesbot/carbon" />
          <root url="file://$MODULE_DIR$/vendor/nikic/php-parser" />
          <root url="file://$MODULE_DIR$/vendor/omnipay/common" />
          <root url="file://$MODULE_DIR$/vendor/overtrue/laravel-wechat" />
          <root url="file://$MODULE_DIR$/vendor/overtrue/socialite" />
          <root url="file://$MODULE_DIR$/vendor/overtrue/wechat" />
          <root url="file://$MODULE_DIR$/vendor/paragonie/random_compat" />
          <root url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-common" />
          <root url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-docblock" />
          <root url="file://$MODULE_DIR$/vendor/phpdocumentor/type-resolver" />
          <root url="file://$MODULE_DIR$/vendor/phpspec/prophecy" />
          <root url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" />
          <root url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" />
          <root url="file://$MODULE_DIR$/vendor/phpunit/php-text-template" />
          <root url="file://$MODULE_DIR$/vendor/phpunit/php-timer" />
          <root url="file://$MODULE_DIR$/vendor/phpunit/php-token-stream" />
          <root url="file://$MODULE_DIR$/vendor/phpunit/phpunit" />
          <root url="file://$MODULE_DIR$/vendor/phpunit/phpunit-mock-objects" />
          <root url="file://$MODULE_DIR$/vendor/pimple/pimple" />
          <root url="file://$MODULE_DIR$/vendor/predis/predis" />
          <root url="file://$MODULE_DIR$/vendor/psr/container" />
          <root url="file://$MODULE_DIR$/vendor/psr/http-message" />
          <root url="file://$MODULE_DIR$/vendor/psr/log" />
          <root url="file://$MODULE_DIR$/vendor/psy/psysh" />
          <root url="file://$MODULE_DIR$/vendor/qiniu/php-sdk" />
          <root url="file://$MODULE_DIR$/vendor/sebastian/comparator" />
          <root url="file://$MODULE_DIR$/vendor/sebastian/diff" />
          <root url="file://$MODULE_DIR$/vendor/sebastian/environment" />
          <root url="file://$MODULE_DIR$/vendor/sebastian/exporter" />
          <root url="file://$MODULE_DIR$/vendor/sebastian/global-state" />
          <root url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" />
          <root url="file://$MODULE_DIR$/vendor/sebastian/version" />
          <root url="file://$MODULE_DIR$/vendor/simplesoftwareio/simple-qrcode" />
          <root url="file://$MODULE_DIR$/vendor/swiftmailer/swiftmailer" />
          <root url="file://$MODULE_DIR$/vendor/symfony/class-loader" />
          <root url="file://$MODULE_DIR$/vendor/symfony/console" />
          <root url="file://$MODULE_DIR$/vendor/symfony/css-selector" />
          <root url="file://$MODULE_DIR$/vendor/symfony/debug" />
          <root url="file://$MODULE_DIR$/vendor/symfony/dom-crawler" />
          <root url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher" />
          <root url="file://$MODULE_DIR$/vendor/symfony/finder" />
          <root url="file://$MODULE_DIR$/vendor/symfony/http-foundation" />
          <root url="file://$MODULE_DIR$/vendor/symfony/http-kernel" />
          <root url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
          <root url="file://$MODULE_DIR$/vendor/symfony/polyfill-php56" />
          <root url="file://$MODULE_DIR$/vendor/symfony/polyfill-util" />
          <root url="file://$MODULE_DIR$/vendor/symfony/process" />
          <root url="file://$MODULE_DIR$/vendor/symfony/psr-http-message-bridge" />
          <root url="file://$MODULE_DIR$/vendor/symfony/routing" />
          <root url="file://$MODULE_DIR$/vendor/symfony/translation" />
          <root url="file://$MODULE_DIR$/vendor/symfony/var-dumper" />
          <root url="file://$MODULE_DIR$/vendor/symfony/yaml" />
          <root url="file://$MODULE_DIR$/vendor/vlucas/phpdotenv" />
          <root url="file://$MODULE_DIR$/vendor/webmozart/assert" />
          <root url="file://$MODULE_DIR$/vendor/zircote/swagger-php" />
        </SOURCES>
      </library>
    </orderEntry>
  </component>
</module>
正确的标注目录类型可以让phpstorm对你的项目进行优化加载,用phpstorm减少这个ide占用的系统资源

案例二:内存上限太小

全局配置文件

进入安装目录编辑webstorm.vmoptions即可

本地配置文件

(1)File-Settings-Editor-General- 去掉 show quick doc on mouse move
(2)File-Settings-Perferences->Inspections,点Copy,复制一份,名称任意。然后点击下面工具栏中的Reset to empty。保存。
(3)点击help选择edit custom VM options会自动生成一份配置(去idea安装路径的bin目录下找到 idea.exe.vmoptions,调整IDEA的启动JVM参数,64位的修改idea64.exe.vmoptions,最小512M最大2048M即可。32位的修改idea.exe.vmoptions,最小256M,最大512M即可)。

找到本地配置文件webstorm.vmoptions

原本文件可能是这个样

#orgin
-Xms128m
-Xmx750m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops

 

修改为

#modify
-d64 # #此项根据你实际Java版本设置 //@TODO 建议升级java x64
-server
-Xms1024m #此项根据你实际内存大小设置 本人8g
-Xmx4096m  #此项根据你实际内存大小设置 本人8g
-XX:MaxPermSize=1024m   #此项根据你实际内存大小设置 本人8g
-XX:ReservedCodeCacheSize=240m  #此项根据你实际内存大小设置 本人8g
-XX:+UseCompressedOops
-Xss4m
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:MinHeapFreeRatio=15
-Xincgc

 

 

不开启评论,如有问题疑问请发邮件。i@ltq.im最长的路 » 解决phpstorm卡顿的问题

评论 抢沙发

评论前必须登录!