struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yasser Zamani (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4895) s:select tags performance issue after upgrading to 2.5.1.3
Date Thu, 23 Nov 2017 07:29:01 GMT

    [ https://issues.apache.org/jira/browse/WW-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16263911#comment-16263911
] 

Yasser Zamani commented on WW-4895:
-----------------------------------

I tested following configuration and could not reproduce your problem. Here it takes about
a few seconds in first call but then, it takes less than half second to load (YourKit profiler
shows these). I think there is something in your side:

{code:java}
public class SelectTagTestAction {
    private List<SelectTagElement> exampleList = new ArrayList<>();

    public List<SelectTagElement> getExampleList() {
        return exampleList;
    }

    public String execute() throws Exception {
        for (int i = 0; i < 250; i++) {
            SelectTagElement ste = new SelectTagElement();
            ste.setLabel("" + i);
            ste.setValue("" + i);
            this.exampleList.add(ste);
        }
        return "success";
    }
}
{code}

{code:xml}
	<package name="default" namespace="/" extends="struts-default">
		<action name="selectTagTestAction"
				class="me.zamani.yasser.ww_convention.actions.SelectTagTestAction">
			<interceptor-ref name="completeStack"/>
		<result name="success">/WEB-INF/content/SelectTagTest.jsp</result>
		</action>
	</package>
{code}

{code:jsp}
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>selectTagTestAction</title>
</head>
<body>
<s:form action="selectTagTestAction">
    <s:select list="exampleList" listKey="value" listValue="label" />
    <s:submit/>
</s:form>
</body>
</html>
{code}

> s:select tags performance issue after upgrading to 2.5.1.3
> ----------------------------------------------------------
>
>                 Key: WW-4895
>                 URL: https://issues.apache.org/jira/browse/WW-4895
>             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"
id="documentTypeDiv">
>                     	<%
> 	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
(v6.4.14#64029)

Mime
View raw message