OK, I did this tutorial thing that was like webwork for struts devs.

Then last week, a friend of mine did a little load test with it.

We discovered that when I use this code on a form:

===
   <w:form action="employee.action?action=save" theme="xhtml">
       <w:hidden name="employee.employeeId"/>
       <w:textfield name="employee.firstName" label="First Name"
size="40" maxlength="40"/>
       <w:textfield name="employee.lastName" label="Last Name"
size="40" maxlength="40"/>
       <w:textfield name="employee.age" label="Age" size="3" maxlength="3"/>
       <w:select label="Department"
                 name="employee.departmentId"
                 list="departmentList"
                 listKey="departmentId"
                 listValue="name"
               />
       <w:submit name="action" value="save" cssClass="butStnd"/>
       <w:submit name="action" value="cancel" cssClass="butStnd"/>
   </w:form>
===

We were getting about 8-10 pages per second. That was a bit of a red
flag, because another page in the tutorial was giving us more like 400
pages per second...same action class, just a different view.

So, I replaced the form tag in the code above with theme="simple", and
still got the same performance - 8-10 pages per second.

Nex, I replaced it with this:

===
   <form action="employee.action?action=save">
       <input type="hidden" name="employee.employeeId"
value="${employee.employeeId}"/>
       <table>
           <tr>
               <td>First Name</td>
               <td><input type="text" name="employee.firstName"
                       value="${employee.firstName}"/></td>
           </tr>
           <tr>
               <td>Last Name</td>
               <td><input type="text" name="employee.lastName"
                       value="${employee.lastName}"/></td>
           </tr>
           <tr>
               <td>Department</td>
               <td>
                   <select name="employee.departmentId">
                       <c:forEach var="dept" items="${departmentList}">
                           <c:choose>
                               <c:when test="${employee.departmentId
eq dept.departmentId}">
                                   <option selected="selected"

value="${dept.departmentId}">${dept.name}</option>
                               </c:when>
                               <c:otherwise>
                                   <option
value="${dept.departmentId}">${dept.name}</option>
                               </c:otherwise>
                           </c:choose>
                       </c:forEach>
                   </select>
               </td>
           </tr>
           <tr>
               <td />
               <td>
                   <input type="button" value="Save"
onclick="save(this.form)" />
                   <input type="button" value="Cancel"
onclick="cancel(this.form)" />
               </td>
           </tr>
       </table>
   </form>
===

Now, I get 400-500 pages per second.

Please, please, please tell me I am missing something here, like a
setting to pleaseMakeMyAppsPerformanceSuck="false" somewhere. ;-)

Larry

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to