facebook

JSP Editor pegs CPU at 100%

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 14 posts - 16 through 29 (of 29 total)
  • Author
    Posts
  • #248547

    Riyad Kalla
    Member

    Good deal keep me posted. I just tried this with 3.1.0 and MyEclipse 4.0.3 and didn’t have a problem there either (but same JDK with both).

    #249267

    anmardo1
    Member

    Hello, I’ve read carefully all your topics, but I am still having the same problem: could be because of the number of lines of the JSP lines? I’ve noticed that when I am editing relative large JSP (about 2000-2500 lines) Eclipse goes very slow and CPU usage reachs near 100%, far away from the usage when I work with aprox. 300 lines jsp’s. I don’t know, it’s possible than Eclipse (v.3.1 with MyEclipse 4.11 and jre 1.5.06) works badly with too-large jsp files?

    #249268

    anchormen
    Member

    @anmardo1 wrote:

    Hello, I’ve read carefully all your topics, but I am still having the same problem: could be because of the number of lines of the JSP lines? I’ve noticed that when I am editing relative large JSP (about 2000-2500 lines) Eclipse goes very slow and CPU usage reachs near 100%, far away from the usage when I work with aprox. 300 lines jsp’s. I don’t know, it’s possible than Eclipse (v.3.1 with MyEclipse 4.11 and jre 1.5.06) works badly with too-large jsp files?

    For me the number off lines doesn’t seem to be the problem. It’s all related to the large jars i’m using.

    #249455

    anmardo1
    Member

    Well, I’ve found a partial solution, maybe it can help you…

    I’ve disabled the real-time syntax checker and the error column placed in the right side of the JSP editor. In consequence, Eclipse doesn’t look for syntax errors while you are typing, so the CPU usage is enormously minor. I think the problem becomes serious while using JSP because syntax, although correct and functional, does not match with what Eclipse (or MyEclipse) expects: and the editor is always searching through the whole file, and constantly informing of errors.

    I don’t know if it’s a definitive solution (in my case, the size of JAR doesn’t seem to be a problem at all) but since I’ve done this, CPU usage levels are normal and general Eclipse behaviour is correct.

    The option I’m talking about:

    Window ->
    Preferences ->
    MyEclipse ->
    Editors ->
    Common Editor Preferences ->
    -> show overview rules
    -> analyze annotations while typing

    The bad thing about this is that I cannot see real-time errors in web files (html, jsp, xml…) but the CPU problem dissappears, and however the errors appear again while running.

    Hope this solve your problem too 🙂

    #249463

    Riyad Kalla
    Member

    Guys,
    When we release MyEclipse 5.0, try and edit again with the reconciler (real-time checking) turned back on again and see if the problems are gone. We are doing a full editor refresh in 5.0.

    #253189

    dionic
    Member

    Hi Riyad,

    I am experiencing the exact same problem with my JSP editor causing max CPU on saves, copy, paste and most importantly on code completion. I’ve tried disabling the Overview Ruler and Analyze Annotations but it still doesn’t help. CTRL+space after an object causes CPU to max and then takes 5 to 10 seconds to bring up code completion pop-up.

    What I find interesting is the following: copying text with CTRL+C maxes CPU however right clicking, selecting Copy doesn’t. The same happens when pasting: CTRL+V maxes CPU but right click, Paste works with only a mini CPU load.

    This also only happens with my large projects, e.g. where my libs add up to about 21MB with the largest being spring.jar (1.9MB), axis.jar (1.6MB) and itext-1.2.jar (1.3MB).
    Unfortunately there are another 65 odd libs in the list, so isolating which of them is causing the problem is a bit difficult. I think the mere loading of them all for a reference to all the classes in all the libs may be half the problem. Strange that it’s fine in the Java editor – I even tried turning off the JSP validation (I’d already disabled all the other validators).

    To give you an indication of the project size itself (Note: size and files include all the CVS files and folders in each folder):
    Java Source: 26.1MB and 2,749 files
    Web Root (excl libs and compiled classes): 13.9MB and 3,356 files
    WEB-INF/lib: 21.4MB and 124 files

    Here are my startup args (which are already customized to use more mem):

    
    C:\eclipse\eclipse.exe -vmargs -Duser.language=en -Xms256M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M -Dosgi.splashLocation="C:\Program Files\MyEclipse\eclipse\MyEclipseSplash.bmp"
    

    Here is my config:

    
    *** Date: Wed Jun 07 01:46:22 CAT 2006
    
    *** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.5.0_06
    
    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    
    Version: 4.1.1 GA
    Build id: 20060309-4.1.1-GA
    
    *** Eclipse details:
    Eclipse SDK
    
    Version: 3.1.0
    Build id: I20050627-1435
    
    Eclipse Platform
    
    Version: 3.1.0
    Build id: I20050627-1435
    
    Eclipse RCP
    
    Version: 3.1.0
    Build id: I20050627-1435
    
    Eclipse Java Development Tools
    
    Version: 3.1.0
    Build id: I20050627-1435
    
    Eclipse Plug-in Development Environment
    
    Version: 3.1.0
    Build id: I20050627-1435
    
    Eclipse Project SDK
    
    Version: 3.1.0
    Build id: I20050627-1435
    
    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    C:\eclipse\eclipse.exe
    -name
    Eclipse
    -showsplash
    600
    -exitdata
    758_2c
    -vm
    C:\WINDOWS\system32\javaw.exe
    

    Can’t wait to try MyEclipse 5.0 to see if it solves this problem. Unfortunately I can’t afford to try the M1 release just yet – usual dev deadlines pending 😉 although if this drives me crazy enough… I may just end up trying it.

    Regards
    Charles

    #253206

    Riyad Kalla
    Member

    Charles,
    That really sounds like a situation where the editor should not be choking so bad, although your build path is quite large… I would have immediately suggested those flags that you are already using… but you are already using them.

    Let me know when you can try 5.0M1 out.

    #253220

    dionic
    Member

    Thanks for the feedback Riyad.

    Yeah, the nature of our projects is such that they get rather large – CRM, services, billing and financial apps. I guess it’ll be another exercise to one day try and split these into multiple projects 😉 Until then I’ll keep persevering.

    I’ll post again as soon as I get round to trying 5.0M1

    #253316

    dionic
    Member

    Hi Riyad,

    I had finally had enough battling so I installed Eclipse 3.2RC7 and MyEclipse 5.0M1.

    The good news is that the JSP editor code completion, cutting, pasting and saving etc all seems to be rather quick for the same large project, which is awesome. So 5.0M1 really does seem to improve the JSP editor performance! Great work!

    However, the joy ended there because my include directives don’t appear to be picked up by the JSP editor. (I’m not sure if this needs to go into a new thread. You’re welcome to move it if you are able to do so.)

    I’ve tried enabling and disabling all the validators and still no luck. Here is a very basic example:
    Create the following header.jspf file (Notice the missing body and closing html tags):

    
    <html>
      <head>
        <title>I wish this would include</title>
      </head>
    

    Now create the following test.jsp file:

    
    <%@ include file="header.jspf" %>
      <body>
        This is my JSP page. <br>
      </body>
    </html>
    

    Firstly a warning occurs on test.jsp line 2: Invalid location of tag (body).
    Then an error occurs on test.jsp line 5: No start tag (html).

    I’ve tried renaming the included file… tried test.jsp and test.jspf etc but can’t seem to get the editor to recognise it.
    I’m not sure if this is just a 5.0M1 problem… but this worked perfectly in 4.1 – my entire project depends on it and when deployed (using Tomcat) the includes work and the pages generate properly – it’s just the editor that doesn’t quite agree.

    Any ideas? I’ve gone through a bunch of preferences and closest I came was to a single check box for Valdating JSP Fragments which I have tried both checked and unchecked but not cigar.

    Regards
    Charles

    #253317

    Riyad Kalla
    Member

    I had finally had enough battling so I installed Eclipse 3.2RC7 and MyEclipse 5.0M1.

    Our internal testing specifically with RC7 has been really buggy, if you have major problems, try stepping back to RC6 or 5.

    The good news is that the JSP editor code completion, cutting, pasting and saving etc all seems to be rather quick for the same large project, which is awesome. So 5.0M1 really does seem to improve the JSP editor performance! Great work!

    Good to hear!

    Any ideas? I’ve gone through a bunch of preferences and closest I came was to a single check box for Valdating JSP Fragments which I have tried both checked and unchecked but not cigar.

    I think this is because in MyEclipse 4.1, we ship the HTML validator off by default because it doesn’t know about includes and is a bit pedantic. But in the Milestone’s of 5.0 we are shipping all the validators turned on. Just close the file, right click on project and go to MyEclipse-Validation and try and turn off the HTML validation, then open it back up.

    #253323

    dionic
    Member

    I think this is because in MyEclipse 4.1, we ship the HTML validator off by default because it doesn’t know about includes and is a bit pedantic. But in the Milestone’s of 5.0 we are shipping all the validators turned on. Just close the file, right click on project and go to MyEclipse-Validation and try and turn off the HTML validation, then open it back up.

    I tried the above – closed file, switched off HTML Validator and openeed file again, but that didn’t work, so then I tried closing the entire project and forced the change in the MyEclipse preferences, then re-opened the project and with the forced re-build it worked perfectly, so thanks! It now works perfectly.

    Our internal testing specifically with RC7 has been really buggy, if you have major problems, try stepping back to RC6 or 5.

    I’m going to stick with RC7 for now seeing as I came right with the HTML validator above. If I have any more hassles I’ll step back, unless you recommend stepping back regardless because you know of some specific issues?

    Thanks for the help – it feels like I’m in a better situation now, just hope working with the milestone and RC versions doesn’t come back to bite me as I’m still working on production code. I think the faster JSP editing is definitely worth the risk though! 😉

    Thanks again,

    Regards
    Charles

    #253335

    Riyad Kalla
    Member

    I’m going to stick with RC7 for now seeing as I came right with the HTML validator above. If I have any more hassles I’ll step back, unless you recommend stepping back regardless because you know of some specific issues?

    No, good plan. Stay put if it’s working.

    Thanks for the help – it feels like I’m in a better situation now, just hope working with the milestone and RC versions doesn’t come back to bite me as I’m still working on production code. I think the faster JSP editing is definitely worth the risk though! 😉

    I know the feeling, so far we haven’t had any big reports, so you should be OK. But stay vigilant just incase.

    #253433

    Scott Anderson
    Participant

    To follow up, we don’t know of any specific issues with 5.0M1 and Eclipse 3.2RC7 at this time.

    #253435

    dionic
    Member

    Yeah, thanks Scott. So far so good for me – running a couple of production projects and no issues to report.

    I just have a couple of interface/functionality suggestions for the Database Explorer and the File Compare interfaces… but I’ll have to find the correct forum to post those in.

    Regards
    Charles

Viewing 14 posts - 16 through 29 (of 29 total)
Reply To: JSP Editor pegs CPU at 100%

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