struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karan Chinchane (JIRA)" <>
Subject [jira] [Commented] (WW-4895) s:select tags performance issue after upgrading to
Date Wed, 22 Nov 2017 18:51:01 GMT


Karan Chinchane commented on WW-4895:

Looks like select2 has performance issue in struts2.5 version.This piece of code works perfectly
file in struts 2.3.

We have tried out all possible ways to print out the values and id from the arraylist on the
jsp page. In the first scenario as you see below we have used c:out (JSTL) and it took less
than a second to print out all of the list values as compared to s:select (STRUTS) tag which
took 8 seconds to print the output.

<div id="exampleListDiv" style="float:left;width:100%; height:100%;padding-top:0px;">
									<%java.util.Date datecout =new java.util.Date();
									<c:forEach items="${exampleList}" var="Obj"> 
										ID:<c:out value="${Obj.value}" />
										 LABEL:<c:out value="${Obj.label}" /> // on iterating the object array  
									<%java.util.Date datecoutend =new java.util.Date();
									KARAN1<%java.util.Date dateSelect =new java.util.Date();
									<s:select  list="exampleList" listKey="value" listValue="label" />
									KARAN2||<%java.util.Date dateSelectEnd =new java.util.Date();
*datecout* Wed Nov 22 13:28:52 EST 2017

		*datecoutEND* Wed Nov 22 13:28:52 EST 2017
		*dateSelect* Wed Nov 22 13:28:52 EST 2017

		*dateSelectEnd* Wed Nov 22 13:29:00 EST 2017

> s:select tags performance issue after upgrading to
> ----------------------------------------------------------
>                 Key: WW-4895
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Tags
>    Affects Versions: 2.5.13
>         Environment: IBM Websphere 8.5 , apache 2.x 
>            Reporter: Harsh Choudhary
>            Priority: Critical
>              Labels: performance
>             Fix For: 2.5.x
> We recently upgraded from Struts 2.1(don't ask) to Struts 2.5.13 , while the upgrade
process was smooth, we are facing some performance issue while JSP is rendering at runtime.
This JSP used to load in less then 2 secs before and now it's taking around 40 secs to load.
It's a very simple JSP with some text fields and a few select fields. I am just posting a
simple select that is taking around 20 secs, I cannot post the whole code because of obvious
reasons. The time difference between the two-time statements below is around 20 secs.  
> I have tried to remove styles, javascript function but still it's taking a long time.
 Any suggestions in this regard will be helpful. This is happening most of the select boxes.
> {code:html}
> System.out.println("logging started");
> java.util.Date date49 = new java.util.Date();
> %>
> The time is now <%= date49 %>
>                             <s:select cssClass="textBox_normal" cssStyle="width:100%;
height:100%" name="showDoc" id="showDoc" multiple="true" size="5" 
> 	       						  headerKey="-1" 
> 	       						  list="doclist"
> 	       						  listKey="id"
> 	       						  listValue="Description"
> 	       						  onchange="disableErrormsg('VarLibAssetErrorDiv');"
> 	       						  />
> 	                </div>
>                     <div style="float:left; width:20%; height:100%; display: none"
>                     	<%
> 	System.out.println("logging started");
> java.util.Date date5 = new java.util.Date();
> %>
> The time is now <%= date5 %>
> {code}

This message was sent by Atlassian JIRA

View raw message