Bug 11329

Summary: Processing spike when nesting a <c:url> in a <c:forEach> in a <c:if>
Product: Taglibs Reporter: Chad Johnson <chadj>
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: Testcase from Chad Johnson

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}"/>
      </c:url>
    </c:forEach>
  </c:if>

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 
increase.

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 
browser.
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