WTP 101 Eclipse 312 Editing JSP CPU goes to 100% and GUI thread blocks [message #165411] |
Thu, 30 March 2006 18:28 |
Chris Gage Messages: 74 Registered: July 2009 |
Member |
|
|
I am using WTP 1.0.1 downloaded from the update site this week, running
on a clean Eclipse 3.1.2. No other plugins are installed. My machine
is a Pentium 4 HT 2.8Ghz with 3GB memory and 80GB HD running Windows XP SP2.
I am editing some sample JSP code from Crystal Reports. This code is
delivered as JSPs but the contents of the JSP is nothing but Java code.
I know this is a bad way to do stuff, and I wish it was otherwise, and
I have told them so, but that's the way their samples come.
I am having a torrid time getting anything done because after editing
for a while, the JSP editor starts locking up at almost every keystroke,
and pegs one of the processors to max for 5 to 10 seconds each time. On
occasions the GUI thread completely blocks, resulting in ignored
keystrokes, and this can be disastrous.
I can reproduce this at will.
Here is an example:
<%@page contentType="text/html" %>
<%@page pageEncoding="UTF-8" %>
<%@page import="com.crystaldecisions.reports.sdk.*"%>
<%@page import="com.crystaldecisions.sdk.occa.report.lib.*"%>
<%@page import="com.crystaldecisions.report.web.viewer.*"%>
<%@page import="com.crystaldecisions.sdk.occa.report.reportsource.* "%>
<%
final String REPORT_NAME = "InactiveUsers.rpt";
try {
System.out.println("Starting...");
ReportClientDocument rcd = new ReportClientDocument();
System.out.println("Opening...");
rcd.open(REPORT_NAME, 0);
System.out.println("Getting report source...");
IReportSource rs = rcd.getReportSource();
System.out.println("Creating viewer...");
CrystalReportViewer viewer = new CrystalReportViewer();
System.out.println("Setting viewer options...");
viewer.setOwnPage(true);
viewer.setOwnForm(true);
viewer.setPrintMode(CrPrintMode.PDF);
System.out.println("Giving report to viewer...");
viewer.setReportSource(rs);
System.out.println("Rendering report...");
ServletContext sc = getServletConfig().getServletContext();
viewer.processHttpRequest(request, response, sc, null);
System.out.println("Complete");
} catch (ReportSDKException e) {
System.out.println("ReportSDKException...");
out.println(e);
} catch (Exception e) {
System.out.println("Exception...");
out.println(e);
}
%>
|
|
|
Re: WTP 101 Eclipse 312 Editing JSP CPU goes to 100% and GUI thread blocks [message #165443 is a reply to message #165411] |
Thu, 30 March 2006 22:02 |
Eclipse User |
|
|
|
Originally posted by: ifedorenko.rogers.com
JVM thread dump can be very helpful here. Start eclipse with -console
command line parameter and then hit Ctrl-Break when CPU is 100%.
Chris Gage wrote:
> I am using WTP 1.0.1 downloaded from the update site this week, running
> on a clean Eclipse 3.1.2. No other plugins are installed. My machine
> is a Pentium 4 HT 2.8Ghz with 3GB memory and 80GB HD running Windows XP
> SP2.
>
> I am editing some sample JSP code from Crystal Reports. This code is
> delivered as JSPs but the contents of the JSP is nothing but Java code.
> I know this is a bad way to do stuff, and I wish it was otherwise, and
> I have told them so, but that's the way their samples come.
>
> I am having a torrid time getting anything done because after editing
> for a while, the JSP editor starts locking up at almost every keystroke,
> and pegs one of the processors to max for 5 to 10 seconds each time. On
> occasions the GUI thread completely blocks, resulting in ignored
> keystrokes, and this can be disastrous.
>
> I can reproduce this at will.
>
> Here is an example:
>
> <%@page contentType="text/html" %>
> <%@page pageEncoding="UTF-8" %>
>
> <%@page import="com.crystaldecisions.reports.sdk.*"%>
> <%@page import="com.crystaldecisions.sdk.occa.report.lib.*"%>
> <%@page import="com.crystaldecisions.report.web.viewer.*"%>
> <%@page import="com.crystaldecisions.sdk.occa.report.reportsource.* "%>
>
> <%
> final String REPORT_NAME = "InactiveUsers.rpt";
>
> try {
> System.out.println("Starting...");
> ReportClientDocument rcd = new ReportClientDocument();
>
> System.out.println("Opening...");
> rcd.open(REPORT_NAME, 0);
>
> System.out.println("Getting report source...");
> IReportSource rs = rcd.getReportSource();
>
> System.out.println("Creating viewer...");
> CrystalReportViewer viewer = new CrystalReportViewer();
>
> System.out.println("Setting viewer options...");
> viewer.setOwnPage(true);
> viewer.setOwnForm(true);
> viewer.setPrintMode(CrPrintMode.PDF);
>
> System.out.println("Giving report to viewer...");
> viewer.setReportSource(rs);
>
> System.out.println("Rendering report...");
> ServletContext sc = getServletConfig().getServletContext();
> viewer.processHttpRequest(request, response, sc, null);
>
> System.out.println("Complete");
> } catch (ReportSDKException e) {
> System.out.println("ReportSDKException...");
> out.println(e);
> } catch (Exception e) {
> System.out.println("Exception...");
> out.println(e);
> }
> %>
|
|
|
|
|
Re: WTP 101 Eclipse 312 Editing JSP CPU goes to 100% and GUI thread blocks [message #165853 is a reply to message #165530] |
Tue, 04 April 2006 14:46 |
Eclipse User |
|
|
|
Originally posted by: dserodio.gmail.com
Chris Gage wrote:
> I can get the thread dump on the console, but the console comes up as a
> command line window and the buffer size allocated is too small to handle
> the amount of data, so you only get part of it.
>
> Is there any way to make the buffer larger and wider?
If you mean Windows' "command line window", you may open one of these
windows (by using Start | Run | cmd.exe), left-click on its "window
icon" (the one to the left of the window title), select Default (or
Standard, I'm not sure since my Windows is localized) then the Layout tab.
There are options for both the window size and the buffer size.
HTH,
Daniel Serodio
|
|
|
Re: WTP 101 Eclipse 312 Editing JSP CPU goes to 100% and GUI thread blocks [message #166173 is a reply to message #165853] |
Fri, 07 April 2006 18:11 |
Eclipse User |
|
|
|
Originally posted by: p_saville.yahoo.com
Anyone else made further progress with this problem?
OK, I was reading this post earlier...
I have tried starting eclipse with the "-console" command line argument.
Everything works fine until I hit CTRL-BREAK (not CTRL-C)... Then I get the
thread and JVM dump (or most of it). It starts to sit waiting on some
thread... This was just a test while it wasn't running at 100% CPU, so I
won't attach the dump. Then, the console window basically crashes??? No more
CTRL-BREAK input is accepted. No more eclipse console input is accepted.
Eclipse does continue to respond though. Am I doing anything wrong? I have
tried windows "command" and "cmd" windows to start eclipse too. I have tried
cygwin "command" and "rxvt" windows too. Same behaviour.
When I get more time to fiddle, I will try again and try to get a dump while
at 100% CPU. It certainly seems to be the WST plugin or specifically the JSP
editor - but sometimes eclipse becomes unresponsive even when not editing
JSPs.
Cheers,
Philip
"Daniel Serodio" <dserodio@gmail.com> wrote in message
news:e0u0s7$t5n$1@utils.eclipse.org...
> Chris Gage wrote:
>> I can get the thread dump on the console, but the console comes up as a
>> command line window and the buffer size allocated is too small to handle
>> the amount of data, so you only get part of it.
>>
>> Is there any way to make the buffer larger and wider?
>
> If you mean Windows' "command line window", you may open one of these
> windows (by using Start | Run | cmd.exe), left-click on its "window
> icon" (the one to the left of the window title), select Default (or
> Standard, I'm not sure since my Windows is localized) then the Layout tab.
> There are options for both the window size and the buffer size.
>
> HTH,
> Daniel Serodio
|
|
|
|
Powered by
FUDForum. Page generated in 0.03600 seconds