I agree.  Just for comparison check out these numbers.  Something is fundamentally 
wrong
with how WW is implemented or how I am abusing it :)

case 1) <ui:select> tag
Execution Time=12.482 sec

case 2) <ww:iterator> tag only
Execution Time=10.709 sec

case 3) JSP scriplet using WW API
Execution Time=0.0020 sec

Here is the code:

<%@ taglib uri="webwork" prefix="ww" %>
<%@ taglib uri="webwork" prefix="ui" %>
<%@ page session="false" %>

<%
    long start, end = -1;
%>

    <table width="100%">
    <tr>
    <!-- start cell with webwork components -->
    <ww:action name="'CountriesList'" id="countrieslist"/>
<% start = System.currentTimeMillis(); %>
    <ui:select label="'Country'" name="'country'" list="@countrieslist/countries" 
listKey="'countryCode'" listValue="'description'"/>
<% end = System.currentTimeMillis(); %>
    <!-- end cell with webwork components -->
    </tr>
    </table>
<p>
Execution Time=<%= ((double)end - start) / 1000.0 %> sec
</p>
    <table width="100%">
    <tr>
    <!-- start cell with webwork components -->
<% start = System.currentTimeMillis(); %>
    Country: <select name="country">
    <ww:iterator value="@countrieslist/countries">
       <option value="<ww:property value="countryCode"/>">
          <ww:property value="description"/>
       </option>
    </ww:iterator>
    </select>
<% end = System.currentTimeMillis(); %>
    <!-- end cell with webwork components -->
    </tr>
    </table>
<p>
Execution Time=<%= ((double)end - start) / 1000.0 %> sec
</p>
    <table width="100%">
    <tr>
    <!-- start cell with webwork components -->
<% start = System.currentTimeMillis(); %>
<%
    webwork.util.ValueStack vs = webwork.util.ValueStack.getStack( pageContext );
    java.util.Collection countries = 
(java.util.Collection)vs.findValue("@countrieslist/countries");
    out.println("<PRE>");
    for(java.util.Iterator iter = countries.iterator(); iter.hasNext(); )
    {
        iter.next();
    }
    out.println("</PRE>");
%>
<% end = System.currentTimeMillis(); %>
    <!-- end cell with webwork components -->
    </tr>
    </table>
<p>
Execution Time=<%= ((double)end - start) / 1000.0 %> sec
</p>



> -----Original Message-----
> From: Hani Suleiman [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, January 12, 2003 3:04 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [OS-webwork] Slow performance using ww:iterator tag
> (version 1.2.1)?
> 
> 
> Only after the first try. I don't think slapping on oscache is the 
> solution, as it just hides the performance problem (of course, adding 
> oscache is always a good idea, but making that first hit faster would 
> also be a good idea)
> 
> On Sunday, January 12, 2003, at 06:00 PM, Mike Cannon-Brookes wrote:
> 
> > Simple : OSCache with a session scoped cache entry. This 
> will drop the 
> > run
> > time down to about 1ms.
> >
> > Cheers,
> > Mike
> >
> > On 12/1/03 9:36 PM, "Robert Nicholson" 
> ([EMAIL PROTECTED]) penned the
> > words:
> >
> >> That is flabbergasting. Couldn't you cache the list when 
> the user logs
> >> in?
> >>
> >> Why don't you take a look at the template and see if you 
> can nail down
> >> what's causing the delays assuming you haven't done that already of
> >> course. If it's user specific what does countries method look like?
> >>
> >> On Sunday, January 12, 2003, at 01:38  AM, Kirk Rasmussen wrote:
> >>
> >>> Happy new year everyone!  I have a simple question about the
> >>> <webwork:iterator> tag and performance using WW 1.2.1.
> >>>
> >>> I have this list of countries that contains 245 entries.  When I
> >>> execute the following fragment, it takes about 15 seconds 
> to execute
> >>> the iterator loop by itself.  Any of you WW gurus have 
> some pointers
> >>> on making it faster?  I can't simply cache the select 
> list because 
> >>> the
> >>> form is for an address book so the selected value is user 
> specific.
> >>>
> >>> <%@ taglib uri="webwork" prefix="ww" %>
> >>> <%@ taglib uri="webwork" prefix="ui" %>
> >>> <%
> >>>     long start, end = -1;
> >>> %>
> >>>
> >>>     <table width="100%">
> >>>     <tr>
> >>>     <!-- start cell with webwork components -->
> >>>     <ww:action name="'CountriesList'" id="countrieslist"/>
> >>> <% start = System.currentTimeMillis(); %>
> >>>     <ui:select label="'Country'" name="'country'"
> >>> list="@countrieslist/countries" listKey="'countryCode'"
> >>> listValue="'description'"/>
> >>> <% end = System.currentTimeMillis(); %>
> >>>     <!-- end cell with webwork components -->
> >>>     </tr>
> >>>     </table>
> >>> <p>
> >>> Execution Time=<%= ((double)end - start) / 1000.0 %> sec
> >>> </p>
> >>>
> >>> Thanks,
> >>> Kirk Rasmussen
> >>> Lucasfilm Ltd.
> >>>
> >>>
> >>> -------------------------------------------------------
> >>> This SF.NET email is sponsored by:
> >>> SourceForge Enterprise Edition + IBM + LinuxWorld  
> Something 2 See!
> >>> http://www.vasoftware.com
> >>> _______________________________________________
> >>> Opensymphony-webwork mailing list
> >>> [EMAIL PROTECTED]
> >>> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> >>
> >>
> >>
> >> -------------------------------------------------------
> >> This SF.NET email is sponsored by:
> >> SourceForge Enterprise Edition + IBM + LinuxWorld = 
> Something 2 See!
> >> http://www.vasoftware.com
> >> _______________________________________________
> >> Opensymphony-webwork mailing list
> >> [EMAIL PROTECTED]
> >> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> >
> >
> >
> > -------------------------------------------------------
> > This SF.NET email is sponsored by:
> > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> > http://www.vasoftware.com
> > _______________________________________________
> > Opensymphony-webwork mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> >
> 
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 


-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to