From UIBean.java:

       if (this.key != null) {

          if(this.name == null) {
               this.name = key;
           }

           if(this.label == null) {
               this.label = "%{getText('"+ key +"')}";
           }

       }

Looks like it's doing exactly the same thing. :(

Even more interesting, look what's going on in the Text.java UI component:

       for (Iterator iterator = getStack().getRoot().iterator();
            iterator.hasNext();) {
           Object o = iterator.next();

           if (o instanceof TextProvider) {
               TextProvider tp = (TextProvider) o;
               msg = tp.getText(actualName, defaultMessage, values, stack);

               break;
           }
       }

No wonder I didn't see any performance issues here and David did--this definitely looks like it would be faster. :) We should probably adopt this model of looking up text in the UIBean class when a key is provided as it might speed things up. I'd love to see some before/after numbers. This might be a tweak you want to apply locally and see if there's a performance gain. (I'll post some if I find some time this weekend)
Tom


Ted Husted wrote:
On 1/26/07, David H. DeWolf <[EMAIL PROTECTED]> wrote:
pages.   The real kicker is when I remove the method invocations
(%{getText('')})  - this results in a 1100-1200ms/request gain (an
average of about 100ms per method invocation) and drops my total request
time to well under a second.

The tags now have a "key" attribute that can be used in place of the
getText OGNL expression.

I'd be curious to know if

<s:textfield key="lastName" />

runs faster than

<s:textfield label="%getText('lastName')" name="lastName" />

If so, I wonder if there other places where we could eliminate common
OGNL statements by adding functionality to the tags.

-Ted.

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




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

Reply via email to