facebook

Code Completion/Content Assist slow [Closed]

  1. MyEclipse Archived
  2.  > 
  3. UML Development
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #232122 Reply

    Mike Haller
    Member

    Problem:
    JSP Editor: Code Completion is extremely slow. After hitting Ctrl-Space, it takes approx. 30 seconds before the Content Assist shows up. (Normal Java Content Assist is running fine in Non-MyEclipse Projects and in MyEclipse-Projects)

    Since it’s in the range of 30sec., this seems to be a network timeout in some way.
    Although, in an empty jsp File, it takes “only” 15 seconds to pop up.
    When I go to Window > Preferences > MyEclipse > Editors > XML, it also takes very long for the pages to show.
    While Eclipse seems to be completely stalled, the CPU usage goes up to 100%. There is nothing unusual in the console log of eclipse until now.

    Sometimes, Eclipse crashes without notice. It just closes.
    The only stuff belonging to this crash from the workspace/.metadata/.log is this:

    
    !ENTRY org.eclipse.ui 4 4 2005-07-01 17:15:28.390
    !MESSAGE Unhandled event loop exception
    
    !ENTRY org.eclipse.ui 4 0 2005-07-01 17:15:28.421
    !MESSAGE Failed to execute runnable (java.lang.OutOfMemoryError: PermGen space)
    
    !ENTRY org.eclipse.ui 4 4 2005-07-01 17:15:43.453
    !MESSAGE Unhandled event loop exception
    
    !ENTRY org.eclipse.ui 4 0 2005-07-01 17:15:43.453
    !MESSAGE PermGen space
    !STACK 0
    java.lang.OutOfMemoryError: PermGen space
    !SESSION Fri Jul 01 17:16:14 CEST 2005 -----------------------------------------
    !ENTRY org.eclipse.core.launcher 4 0 2005-07-01 17:16:14.31
    !MESSAGE Exception launching the Eclipse Platform:
    !STACK
    java.lang.OutOfMemoryError: PermGen space
    

    Software Environment:
    Purchased Version: 3.9.210
    Build id: 20050627-4.0-Milestone-2

    Eclipse SDK
    Eclipse 3.1 (Official Stable Release), Windows 2000
    Version: 3.1.0
    Build id: I20050627-1435
    Started with -Xmx512M, -console, -consolelog

    Java 1.5.0

    Organisation uses a firewall and proxy, the proxy is correctly set up in the Eclipse Preferences (fetching Update Sites is no problem)

    #232134 Reply

    Riyad Kalla
    Member

    mhaller,
    The OOM exception for perm space is definately a red flag… how big is this project? How big is the JSP page? How tag-intesive is the page? How many includes does it have? When was the last time you had your tires rotated?

    #232156 Reply

    Mike Haller
    Member

    muhaha 🙂

    My workspace contains a total of 139 projects, some of them are open, some are closed.
    But there is only one project which is relevant to MyEclipse.
    It contains 124 libraries in the build path.
    There are two very small webapps, and an exist-xmldb admin webapp in /webapps/
    I start the whole thing with a Jetty launch config, Jetty finds the three webapps in /webapps/. It’s all running fine and fast enough.
    My test.jsp only consists of this:

    
    <%
    
    %>
    

    If I hit ctrl-space for Content Assist, it takes 20-30 seconds to show up, and there are is only the standard stuff in there. No imports etc. declared in this jsp file. If I go to project properties > MyEclipse-Web, the content root is set to /webapps/admingui, which is one of the three webapps in this project.
    So i think myeclipse is using /webapps/admingui/WEB-INF/web.xml, and there are only 8 taglibs defined, all locally.

    I rotated my tires two weeks ago. New Hancook tires, 205x60xR15H (‘H’ type is verified for up to 210km/h) or something like that. Don’t know the exact label 🙂

    #232160 Reply

    Riyad Kalla
    Member

    How does the tag autocomplete perform? The reason your scriplet autocomplete is performing so poorly is likely dude to the class name lookup across 100+ JARs in your build path, certainly not a performant situation (I’m not implying we can’t make it better). Try and autocomplete:

    <jsp:|

    how fast was that?

    Try and autocomplete:
    <%
    String s = new Str|
    %>

    how fast was that?

    You gave it mroe memory which should help, but is there any way to trim down the classpath for that project?

    Try this:

    1) File > new > Project > Web Project, name “TestMe”, hit OK
    2) File > New > JSP Page (drop it in the WebRoot folder)

    open it up, put in scriptlet tags:
    <%
    %>

    try autocomplete, is it faster?

    #232167 Reply

    Mike Haller
    Member

    Hey Riyad,

    thank you very very much for your fast help.
    It was definetively the large amount of libraries.

    I have removed a User Library which 83 libs (27mb) from the direct build path of the project itself. (It was only needed for the launching, not at development time). This resolved the problem.

    Still, i’ve got 50 libs left in the project, splitted into three User Libraries. Which is working fine now.

    Thanks and have a nice weekend.

    #232186 Reply

    Riyad Kalla
    Member

    Glad to hear that helped, have a nice weekend as well.

    #235500 Reply

    vanetten
    Member

    Are you working on improving the performance of the code completion? We have many jar that are required for a build, and even with all the jars on my C: drive there is a considerable Are you working on improving the performance of the JSP code completion? We have many jars (~60) that are required for a build, and even with all the jars on my C: drive there is a considerable lag of 7 seconds at 100% CPU load on a 3ghz processor. Eclipse has no problems with its code completion, so it seems there is room for some improvement. I recall this not being a problem with 3.7

    Thanks,
    John

    #235501 Reply

    Riyad Kalla
    Member

    John, yes we are tracknig this issue and hope to get some time to fix it for 5.0 release, sorry for the inconvenience. In the mean time, is there *any* way to trim down the build path, or you really need all 60 to avoid compile-time errors?

    #235502 Reply

    vanetten
    Member

    Thanks for the update. I’ll see what can be trimmed.

    Thanks,
    John

    #241814 Reply

    Mark Ricard
    Member

    I used to have this problem all the time. Two things got rid of it:

    1.) If you right click on your myeclipse icon and select properties, add the following after the -vmargs param
    -XX:PermSize=256m -XX:MaxPermSize=512m

    2.) Open eclipse, then click on Windows|Preferences|Java|Installed JREs and add the same parameters to the vm you are using inside myeclipse.

    After doing both, I have never seen the PermGen error again.

    Hope this helps,
    Mark

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Code Completion/Content Assist slow [Closed]

You must be logged in to post in the forum log in