Eclipse Slow optimization

Source: Internet
Author: User

1. Open Eclipse.ini

-showsplash
Com.genuitec.myeclipse.product
--launcher. Xxmaxpermsize
256M
-vmargs
-dosgi.requiredjavaversion=1.5
-xms128m
-xmx512m
-dosgi.splashlocation=e:myeclipse 6.0eclipsemyeclipsesplash.bmp
-duser.language=en
-xx:permsize=128m
-xx:maxpermsize=256m
Put the following-xx:maxpermsize, such as-xx:maxpermsize=512m, and then make-xx:permsize as big as-xx:maxpermsize
Reason: Everyone must be familiar with this picture:

Almost every time Eclipse card is due to this non-heap memory, the maximum and minimum is the same because the myeclipse is not allowed to change the size of the memory area frequently

Note: The size of xx:maxpermsize and XMX cannot exceed the size of your computer's memory!

2, Windows–>perferences–>myeclipse–>validation
Drop all except the manual below, build only leave classpath dependency Validator

Manual Verification Method:
On the file that you want to verify, right-click –>myeclipse–>run validation

3, spell check will bring us a lot of trouble, our method name will be the abbreviation of the word, he will also suggest mistakes, so it is best to remove, not much use:
Windows–>perferences–>general–>validation->editors->text editors->spelling

4, Windows–>perferences–>general–>startup and shutdown
Turn off the useless startup item:

How do you know which startup items are useful? I now know the use of the start-up to say, there are many do not understand, I hope you understand the reply in the following AH:
WTP: A thing similar to MyEclipse, the main difference is that the WTP is free, if you use MyEclipse, this can be canceled
Mylyn: Team task management tools, similar to CVS, manage project progress in a task-based organization, which can be canceled
Derby: A database saved as a jar, I didn't use it, I canceled it.
A large row of MyEclipse Easie start items: MyEclipse supported servers, only choose their own, other cancellations, such as I only chose Tomcat

5, MyEclipse Open JSP default editor is not good, will open the preview at the same time
Windows–>perferences–>general–>editors->file Associations

Change the default to MyEclipse JSP Editor

Many people use eclipse when it takes a long time to open or close, how can I run eclipse quickly? The following Dongpo small series to tell everyone why running eclipse is slow, quickly turn on Eclipse configuration (Eclipse.ini) operation steps.

Why running eclipse is slow
Do you know why every time you start eclipse it's so slow? Is it because we are installing too many plugins or are we creating too many projects too large? No, they're not! In fact, a lot of the time is because our configuration is unreasonable. So where do we go with this configuration? The answer is to go to Eclipse.ini.

Quick Start Eclipse configuration operation steps
First, you should add the following files to the Eclipse.ini configuration file:
-xloggc:gc.log
This shows what eclipse did when it started.
Next, we can start to do some optimizations. Here we give an example, the native memory environment is 3.16G.
First time optimization
Set-XMS (Initialize heap size) and-XMX (JVM maximum heap size) to 512M to avoid duplicate collection of useless cells (GC), here is the configuration:
-xms512m
-xmx512m
-verbose:gc
-xx:+printgcdatestamps
-xx:+printgcdetails
-xloggc:gc.log
Now restart Eclipse, we'll find a GC that monitors 8 full GC and 3 timeouts, and the logs are:
1
2014-06-09t20:39:00.480+0800:1.850: [GC 1.850: [defnew:139776k->17472k (157248K), 0.0613123 secs] 139776k-> 20106K (506816K), 0.0614226 secs] [times:user=0.06 sys=0.00, real=0.06 secs]
2
2014-06-09t20:39:01.214+0800:2.597: [Full GC 2.597: [tenured:2634k->35922k (349568K), 0.1242231 secs] 81163k-> 35922K (506816K), [perm:16383k->16383k (16384K)], 0.1243415 secs] [times:user=0.11 sys=0.01, real=0.13 secs]
3
2014-06-09t20:39:01.698+0800:3.075: [Full GC 3.075: [tenured:35922k->38486k (349568K), 0.1086032 secs] 121915k-> 38486K (506816K), [perm:20479k->20479k (20480K)], 0.1087152 secs] [times:user=0.11 sys=0.00, real=0.11 secs]
4
2014-06-09t20:39:02.026+0800:3.408: [Full GC 3.408: [tenured:38486k->39671k (349568K), 0.1166902 secs] 52893k-> 39671K (506816K), [perm:24575k->24575k (24576K)], 0.1168707 secs] [times:user=0.13 sys=0.00, real=0.13 secs]
5
2014-06-09t20:39:02.558+0800:3.926: [Full GC 3.926: [tenured:39671k->41312k (349568K), 0.1572323 secs] 57131k-> 41312K (506816K), [perm:28671k->28650k (28672K)], 0.1573102 secs] [times:user=0.16 sys=0.00, real=0.16 secs]
6
2014-06-09t20:39:03.276+0800:4.653: [Full GC 4.653: [tenured:41312k->44308k (349568K), 0.1656481 secs] 87405k-> 44308K (506816K), [perm:32767k->32767k (32768K)], 0.1657328 secs] [times:user=0.17 sys=0.00, real=0.17 secs]
7
2014-06-09t20:39:04.058+0800:5.439: [GC 5.439: [defnew:139776k->17472k (157248K), 0.0356182 secs] 184084k-> 62657K (506816K), 0.0357149 secs] [times:user=0.05 sys=0.00, real=0.05 secs]
8
2014-06-09t20:39:04.105+0800:5.475: [GC 5.475: [defnew:19934k->7k (157248K), 0.0245383 secs] 65119k->62662k ( 506816K), 0.0246034 secs] [times:user=0.02 sys=0.00, real=0.02 secs]
9
2014-06-09t20:39:04.136+0800:5.507: [Full GC 5.507: [tenured:62654k->62672k (349568K), 0.1803366 secs] 68235k-> 62672K (506816K), [perm:36863k->36863k (36864K)], 0.1804263 secs] [times:user=0.17 sys=0.00, real=0.17 secs]
10
2014-06-09t20:39:04.839+0800:6.215: [Full GC 6.215: [tenured:62672k->64003k (349568K), 0.2267431 secs] 198067k-> 64003K (506816K), [perm:40959k->40959k (40960K)], 0.2268157 secs] [times:user=0.23 sys=0.00, real=0.23 secs]
11
2014-06-09t20:39:06.417+0800:7.796: [Full GC 7.796: [tenured:64003k->71144k (349568K), 0.3148881 secs] 182608k-> 71144K (506816K), [perm:45055k->45035k (45056K)], 0.3149710 secs]
From the log we can see that the cause of the full GC is Perm, and we can continue to do some optimizations.
Second optimization
We can set the initial value and the maximum value of the perm size to 512M:
-xms512m
-xmx512m
-xx:permsize=512m
-xx:maxpermsize=512m
-verbose:gc
-xx:+printgcdatestamps
-xx:+printgcdetails
-xloggc:gc.log
The logged log is this:
1
2014-06-09t20:43:29.442+0800:1.872: [GC 1.872: [defnew:139776k->17472k (157248K), 0.0614285 secs] 139776k-> 20106K (506816K), 0.0615441 secs] [times:user=0.06 sys=0.00, real=0.06 secs]
2
2014-06-09t20:43:30.426+0800:2.852: [GC 2.852: [defnew:157248k->17472k (157248K), 0.0714705 secs] 159882k-> 37813K (506816K), 0.0715851 secs] [times:user=0.06 sys=0.02, real=0.08 secs]
3
2014-06-09t20:43:32.176+0800:4.608: [GC 4.608: [defnew:157248k->17472k (157248K), 0.0846898 secs] 177589k-> 59609K (506816K), 0.0848035 secs] [times:user=0.09 sys=0.00, real=0.09 secs]
4
2014-06-09t20:43:32.676+0800:5.099: [GC 5.099: [defnew:157248k->3513k (157248K), 0.0443054 secs] 199385k-> 63063K (506816K), 0.0444509 secs] [times:user=0.05 sys=0.00, real=0.05 secs]
5
2014-06-09t20:43:33.285+0800:5.705: [GC 5.705: [defnew:143289k->10365k (157248K), 0.0427973 secs] 202839k-> 69914K (506816K), 0.0428756 secs]
There is no longer a full GC, but we still see 5 small GC, because we didn't set the-xmn.
Third-time optimization
Set-XMN to 256M, log as:
1
2014-06-09t20:45:29.204+0800:2.500: [GC 2.500: [defnew:209792k->26176k (235968K), 0.0951747 secs] 209792k-> 35901K (498112K), 0.0952914 secs] [times:user=0.09 sys=0.00, real=0.09 secs]
2
2014-06-09t20:45:31.220+0800:4.515: [GC 4.515: [defnew:235968k->22389k (235968K), 0.1084576 secs] 245693k-> 58147K (498112K), 0.1085766 secs] [times:user=0.11 sys=0.00, real=0.11 secs]
3
2014-06-09t20:45:32.001+0800:5.302: [GC 5.302: [defnew:232181k->5280k (235968K), 0.0570383 secs] 267939k-> 63248K (498112K), 0.0571581 secs]
There are only 3 small GC's left.
The final configuration is:
-xmn256m
-xms512m
-xmx512m
-xx:permsize=512m
-xx:maxpermsize=512m
-verbose:gc
-xx:+printgcdatestamps
-xx:+printgcdetails
-xloggc:gc.log
I hope the above method can help everyone.

Download the eclipse3.6, not how long the card up, find the reason for a long time, finally found may be caused by the following reasons:

1, "Usage Data Collector" This pathetic plugin, it collects some user's operation information then sends to the Eclipse Foundation, the operation is many, will occupy the very big memory, is almost like the virus, windows-"preference-" selects "The Usage Data Collector "This option, disable off, done!"

2,project-"build automatically, remove the auto-built project.

3, modify the Eclipse INI file as follows:

-startup
Plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-product
Org.eclipse.epp.package.jee.product
--launcher.defaultaction
OpenFile
--launcher. Xxmaxpermsize
1024M (This has the original 128m changed to 1G to use)
-showsplash
Org.eclipse.platform
--launcher. Xxmaxpermsize
128m
--launcher.defaultaction
OpenFile
-vmargs
-dosgi.requiredjavaversion=1.5
-xms40m
-xmx512m

Summary: Now know that the above three methods can be slightly modified under the eclipse configuration, to improve his operational efficiency. Also look to those who have more experience to give a summary and supplement.

Download the eclipse3.6, not how long the card up, find the reason for a long time, finally found may be caused by the following reasons:

1, "Usage Data Collector" This pathetic plugin, it collects some user's operation information then sends to the Eclipse Foundation, the operation is many, will occupy the very big memory, is almost like the virus, windows-"preference-" selects "The Usage Data Collector "This option, disable off, done!"

2,project-"build automatically, remove the auto-built project.

3, modify the Eclipse INI file as follows:

-startup
Plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-product
Org.eclipse.epp.package.jee.product
--launcher.defaultaction
OpenFile
--launcher. Xxmaxpermsize
1024M (This has the original 128m changed to 1G to use)
-showsplash
Org.eclipse.platform
--launcher. Xxmaxpermsize
128m
--launcher.defaultaction
OpenFile
-vmargs
-dosgi.requiredjavaversion=1.5
-xms40m
-xmx512m

Summary: Now know that the above three methods can be slightly modified under the eclipse configuration, to improve his operational efficiency. Also look to those who have more experience to give a summary and supplement.

Eclipse slow Optimization (RPM)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.