标签:
 

npm install --save很多包的时候 还会卡死Java的各种运行命令 来对程序进行优化java
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32      use a 32-bit data model if available
    -d64      use a 64-bit data model if available
    -server   to select the "server" VM
                  The default VM is server,
                  because you are running on a server-class machine.
    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A : separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose:[class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -no-jre-restrict-search
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
java -X
   -Xmixed           mixed mode execution (default)
    -Xint             interpreted mode execution only
    -Xbootclasspath:<directories and zip/jar files separated by :>
                      set search path for bootstrap classes and resources
    -Xbootclasspath/a:<directories and zip/jar files separated by :>
                      append to end of bootstrap class path
    -Xbootclasspath/p:<directories and zip/jar files separated by :>
                      prepend in front of bootstrap class path
    -Xdiag            show additional diagnostic messages
    -Xnoclassgc       disable class garbage collection
    -Xincgc           enable incremental garbage collection
    -Xloggc:<file>    log GC status to a file with time stamps
    -Xbatch           disable background compilation
    -Xms<size>        set initial Java heap size
    -Xmx<size>        set maximum Java heap size
    -Xss<size>        set java thread stack size
    -Xprof            output cpu profiling data
    -Xfuture          enable strictest checks, anticipating future default
    -Xrs              reduce use of OS signals by Java/VM (see documentation)
    -Xcheck:jni       perform additional checks for JNI functions
    -Xshare:off       do not attempt to use shared class data
    -Xshare:auto      use shared class data if possible (default)
    -Xshare:on        require using shared class data, otherwise fail.
    -XshowSettings    show all settings and continue
    -XshowSettings:all
                      show all settings and continue
    -XshowSettings:vm show all vm related settings and continue
    -XshowSettings:properties
                      show all property settings and continue
    -XshowSettings:locale
                      show all locale related settings and continue
The -X options are non-standard and subject to change without notice.
The following options are Mac OS X specific:
    -XstartOnFirstThread
                      run the main() method on the first (AppKit) thread
    -Xdock:name=<application name>"
                      override default application name displayed in dock
    -Xdock:icon=<path to icon file>
                      override default icon displayed in dock
-d64  #选择以64位Java运行 //@todo 检查你系统的Java是64还是32的 再使用此项
-server #选择以服务器的模式运行Java程序
-Xincgc #启用增量垃圾收集
-Xms <大小> #设置初始Java堆大小
-Xmx <大小> #设置最大Java堆大小
-Xss <大小> #设置Java线程堆栈大小

bin目录cd /Applications/WebStorm.app/Contents/bin
fsnotifier              java_pid12702.hprof     libbreakgen64.dylib     log.xml
idea.properties         libMacNativeKit64.dylib libbreakgen64.jnilib    printenv.py
inspect.sh              libbreakgen.dylib       libyjpagent.dylib       restarter
java_pid11040.hprof     libbreakgen.jnilib      libyjpagent.jnilib      webstorm.vmoptions
webstorm.vmoptions即可cd ~/Library/Preferences/WebStorm2016.1
colors               idea.properties      options              tasks
disabled_plugins.txt inspection           port                 templates
disabled_update.txt  javascript           port.lock            webstorm.vmoptions
fileTemplates        jvm.md               settings.jar         webstorm120.key
webstorm.vmoptionssubl ./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

标签:
原文地址:http://blog.csdn.net/baidu_16051437/article/details/51334393