Bug 11329 - Processing spike when nesting a <c:url> in a <c:forEach> in a <c:if>
Summary: Processing spike when nesting a <c:url> in a <c:forEach> in a <c:if>
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: unspecified
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2002-07-31 13:56 UTC by Chad Johnson
Modified: 2004-11-16 19:05 UTC (History)
0 users

Testcase from Chad Johnson (11.68 KB, text/plain)
2002-07-31 13:59 UTC, Chad Johnson

Note You need to log in before you can comment on or make changes to this bug.
Description Chad Johnson 2002-07-31 13:56:59 UTC
Not entirely sure if this is a bug or not but here goes anyway.

I have a jsp that reads (attached will also be the full jsp file):

  <c:if test="${users != null}">
    <c:forEach var="row" items="${users}">
      <c:url value="newUrl" var="viewUrl">
        <c:param name="id" value="${attr}"/>

When this page gets hits very often AND is running on a large collection the 
java process that Tomcat is running in will spike to 100% and memory usage 
will slowly go up after all the page requests have been finished.  Over a 
period of time processor utilization goes down and memory usage will cease to 

The interesting thing is, if you take the beginning and closing <c:if> tags 
out this problem doesn't manifest itself.
Comment 1 Chad Johnson 2002-07-31 13:59:21 UTC
Created attachment 2545 [details]
Testcase from Chad Johnson
Comment 2 Chad Johnson 2002-07-31 18:37:15 UTC
Some clarifications:

1.) I tested this using version 1.0.1
2.) By "gets hits very often" I mean vigoursly hitting the reload button in a 
3.) The cpu spike and memory increase show themselves once all page requests 
have been answered.  So that leads me to think that both aren't due to regular 
page processing.
Comment 3 Pierre Delisle 2003-01-14 00:18:58 UTC
Could not reproduce the problem. 
Closing the bug for now. If you still feel there is 
a problem, please reopen with additional details and/or
different sample code.
Comment 4 Chad Johnson 2003-04-30 13:41:12 UTC
To add some closure:

When I was seeing this problem I was using a beta version of the 3.x Mysql 
driver (converting a ResultSet to a Result, then iterating over that with 
forEach).  After upgrading to a stable version this problem went away.
Comment 5 Chad Johnson 2003-04-30 13:43:06 UTC
To clarify:
"stable version" of the Mysql 3.x series Mysql driver