Aumente a performance do Eclipse (Também funciona para ZendStudio)

19 Out

Eclipse (software)

Image via Wikipedia

Acelerando o Eclipse

Eclipse é a minha IDE de uso diário, e geralmente atende todas as minhas necessidade muito bem, mas é comum ouvir as pessoas perguntando por aí como torna-lo mais rápido ou porque ele é tão estupidamente lento.

Sinceramente é bastante fácil tornar o eclipse mais rápido, o que eu não entendo é porque o arquivo de configuração do eclipse vem com valores tão baixos de uso de memória.

Primeiramente enconte seu arquivo de configuração .ini . Acesse a pasta de instalação do eclipse e abra o arquivo eclipse.ini (também funciona para o ZendStudio.ini), agora podemos alterar algumas linhas para tornar o eclipse bem mais rápido. Um único aviso, antes de alterar essse arquivo  BACKUP, BACKUP e BACKUP!

Se você já está confortável com esse arquivo, vá diretamente para o final config files por sua conta e risco. Eu recomendo a leitura, é um artigo bem curto afinal!

  1. Remove a tela de splash
    No início do arquivo adicione “-nosplash”
  2. Especifique sua JVM
    Procure pela linha com “-vmargs” e adicione a linha correata (veja abaico) ANTES dela. IMPORTANTE: o caminho para sua JVM deve estar em uma única linha e deve estar uma linha abaixo da “-vm”
    No windows ficaria algo assim:

    -vm
    C:\Java\JDK\1.5\bin\javaw.exe
    -vmargs

    No Linux:

    -vm
    /opt/sun-jdk-1.6.0.02/bin/java
    -vmargs

    No MacOS

    -vm
    /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java
    -vmargs
  3. Aumente heap size and permgen size (Dê mais RAM pro eclipse trabahar)
    Xms -> Quantidade de RAM que a JVM irá alocar na inicialização
    Xmx -> Quantidade máxima de RAM alocável
    -XX:PermSize/-XX:MaxPermSize ->  quantidade de memória permitida para objetos permanentes na memória
    No meu computador as configurações ficam assim, ajuste conforme achar necessário:

    -vmargs
    -XX:PermSize=256M
    -XX:MaxPermSize=256M
    -Xms256M
    -Xmx768M
  4. Otimizações Avançadas
    You can squeeze more juice with some other cool startup configurations under the “-vmargs” section of the file, BE CAREFULL with this settings
    Add the option “-Xverify:none” to skip validation of .class files
    Use “-XX:+AggressiveOpts” instead of Permsize/MaxPermsize  options if you want JVM to try to find out the best values for you machine
    -XX:+UseParallelOldGC -> Use the old garbage collector
    -XX:ParallelGCThreads=2 -> number of threads running in paralell
    -XX:ThreadPriorityPolicy=1 -> here 1 means “aggresive” under linux you must be running as root. Atention: this can slow down your system if your Eclipse become a bit hungry for resources…
    -XX:+AggressiveHeap -> Your eclipse can just close without any warning with this configuration depending on your JVM version. Try to update you JVM if this happens and if you can’t fix it just remove this line. By the way it tells the JVM to find out the best heap size for your machine. Substitute the Xms/Xmx lines for this one to try out.

Final eclipse.ini file (Agressive)

-nosplash
-vm
C:/Program Files/Java/jdk1.6.0_23/bin/javaw.exe
-vmargs
-XX:+AggressiveHeap
-XX:+AggressiveOpts
-XX:+UseParallelOldGC
-XX:ParallelGCThreads=2
-XX:ThreadPriorityPolicy=1
-Xverify:none

Final eclipse.ini (moderated)

-nosplash
-vm
C:/Program Files/Java/jdk1.6.0_23/bin/javaw.exe
-vmargs
-XX:PermSize=256M
-XX:MaxPermSize=256M
-Xms256M
-Xmx768M
-XX:+UseParallelOldGC
-XX:ParallelGCThreads=2
-XX:ThreadPriorityPolicy=1
-Xverify:none

One more step for Windows 7 and Vista users

While not directly related to Eclipse:

If you’re running Win-7 or Vista, disable the file indexing of your workspace – your home folder. Windows by default indexes everything in you home folder, and it’s normally just a waste for your workspace. Right click the workspace folder in explorer ,Properties->Advanced and uncheck the “Index this folder for faster searching”

Worth checking links:


VN:F [1.9.22_1171]
Rating: 5.0/5 (2 votes cast)
Aumente a performance do Eclipse (Também funciona para ZendStudio), 5.0 out of 5 based on 2 ratings

4 Responses to “Aumente a performance do Eclipse (Também funciona para ZendStudio)”

  1. nfs world hack abril 1, 2012 at %H:%M 03Sun, 01 Apr 2012 03:01:17 +000017. #

    I used to be suggested this blog by way of my cousin. I’m not positive whether or not this publish is written via him as nobody else recognise such designated about my difficulty. You’re amazing! Thank you!

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
  2. xbox 360 emulator v3.2 março 24, 2012 at %H:%M 09Sat, 24 Mar 2012 09:05:24 +000024. #

    I think that is among the most significant information for me. And i am happy studying your article. But want to remark on few basic issues, The site taste is great, the articles is truly excellent : D. Excellent job, cheers

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
  3. Eiswürfelformen março 14, 2012 at %H:%M 08Wed, 14 Mar 2012 20:23:23 +000023. #

    Youre so cool! I dont suppose Ive read anything like this before. So nice to find any individual with some authentic thoughts on this subject. realy thank you for beginning this up. this website is something that is needed on the net, somebody with a little originality. useful job for bringing one thing new to the web!

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
  4. Lida Riech março 14, 2012 at %H:%M 07Wed, 14 Mar 2012 19:39:08 +000008. #

    Along with the whole thing that appears to be building inside this specific subject material, all your perspectives are actually fairly stimulating. Nonetheless, I am sorry, but I do not subscribe to your entire theory, all be it refreshing none the less. It would seem to everyone that your opinions are actually not completely rationalized and in reality you are generally your self not entirely convinced of your point. In any event I did enjoy reading it.

    VA:F [1.9.22_1171]
    Rating: 3.0/5 (2 votes cast)

Leave a Reply