You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "Immanuel, Gidado-Yisa" <av...@cdc.gov> on 2001/11/14 18:25:14 UTC
Limits of custom-tags in JSP
I ran into this problem a couple weeks ago, and I just thought
I would relay it to the group. We were in the process of
putting a dynamically generated report together (quick and dirty)
using struts. Here's a little bit of information about the platform
we were running on:
Platform: Windows/2000, 2GB RAM, 900Mhz
JVM: Sun 1.3.1_01
Servlets: Tomcat 3.2.3 (similar results for 3.3 & 4.01)
The page we created had about 150 custom-tags on it, which took
a 14K JSP file and blew it up to a 410K java file. javac compiled
it fine. But when the class was loaded and used, the JVM would
crash (see message below). Below are the results from a 'test.jsp'
which used only '<bean:define>' tags:
JVM FILE SIZE(K) NUMBER OF TAGS
COMPILER CLASS JAVA TO CRASH JVM
HotSpot Client 35 251 131
HotSpot Server 55 386 200 No Crash *
Classic 56 386 200 No Crash *
Note (*): You'll notice in this test that there was no crash
for Hotspot Server and classic, however, I did get a
"java.lang.VerifyError: ... Illegal target of jump or branch",
meaning (I guess) that the class files are too big to be
handled by the verifier.
My original demo used about 150 tags, a mixture of Tags and
BodyTags, and caused Hotspot Server to crash at around 113 tags
and Hotspot Client crashed around 85, while Classic could not
load-up my webapp.
Obviously the design requires some rethinking, if we're reaching
these types of limits. What I've learned is that custom-tags
are *bulky* (as implemented in tomcat/catalina). As a corollary,
I know try to use '<%=var1%>' instead of
'<bean:write name="var1"/>' when feasible, etc.
- Gidado
Here's the message when the JVM crashed:
#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 47454E45524154452F4F502D41500E435050084B
#
# Problematic Thread: prio=5 tid=0x8ac06a8 nid=0x7cc runnable
#
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Limits of custom-tags in JSP
Posted by ma...@tumbleweed.com.
This has to do with the limit on the size of a compiled method in a Java
class file. I posted the following to struts-user on this some time ago:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg04902.html
--
Martin Cooper
----- Original Message -----
From: "Immanuel, Gidado-Yisa" <av...@cdc.gov>
To: "'Struts Developers List'" <st...@jakarta.apache.org>
Sent: Wednesday, November 14, 2001 9:25 AM
Subject: Limits of custom-tags in JSP
> I ran into this problem a couple weeks ago, and I just thought
> I would relay it to the group. We were in the process of
> putting a dynamically generated report together (quick and dirty)
> using struts. Here's a little bit of information about the platform
> we were running on:
>
> Platform: Windows/2000, 2GB RAM, 900Mhz
> JVM: Sun 1.3.1_01
> Servlets: Tomcat 3.2.3 (similar results for 3.3 & 4.01)
>
> The page we created had about 150 custom-tags on it, which took
> a 14K JSP file and blew it up to a 410K java file. javac compiled
> it fine. But when the class was loaded and used, the JVM would
> crash (see message below). Below are the results from a 'test.jsp'
> which used only '<bean:define>' tags:
>
> JVM FILE SIZE(K) NUMBER OF TAGS
> COMPILER CLASS JAVA TO CRASH JVM
> HotSpot Client 35 251 131
> HotSpot Server 55 386 200 No Crash *
> Classic 56 386 200 No Crash *
>
> Note (*): You'll notice in this test that there was no crash
> for Hotspot Server and classic, however, I did get a
> "java.lang.VerifyError: ... Illegal target of jump or branch",
> meaning (I guess) that the class files are too big to be
> handled by the verifier.
>
> My original demo used about 150 tags, a mixture of Tags and
> BodyTags, and caused Hotspot Server to crash at around 113 tags
> and Hotspot Client crashed around 85, while Classic could not
> load-up my webapp.
>
> Obviously the design requires some rethinking, if we're reaching
> these types of limits. What I've learned is that custom-tags
> are *bulky* (as implemented in tomcat/catalina). As a corollary,
> I know try to use '<%=var1%>' instead of
> '<bean:write name="var1"/>' when feasible, etc.
>
> - Gidado
>
> Here's the message when the JVM crashed:
> #
> # HotSpot Virtual Machine Error, Internal Error
> # Please report this error at
> # http://java.sun.com/cgi-bin/bugreport.cgi
> #
> # Error ID: 47454E45524154452F4F502D41500E435050084B
> #
> # Problematic Thread: prio=5 tid=0x8ac06a8 nid=0x7cc runnable
> #
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>