DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17728>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17728

EvalHelper should not throw NullAttributeException, it's too slow

           Summary: EvalHelper should not throw NullAttributeException, it's
                    too slow
           Product: Struts
           Version: 1.1 RC1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Custom Tags
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


NullAttributeException invokes the standard taglibs Resource.getMessage routine 
for the exception message.  This is uneeded overhead since the message is never 
displayed to an end-user and only used to fill in default values on the 
extended el tags.

Since many tags have optional attributes, the EvalUtil will throw many 
NullAttributeExceptions.  Inserting tags in a loop will generate hundreds of 
these exceptions in a single page creating lag for 1 page easily between 5-20 
sec.

You could throw a different exception that had a simple string that did not 
have to be calculated which would be faster, but this would also generate a lot 
of objects to be garbage collected also slowing the system.

Consider either returning null and letting the calling function take 
appropriate action, or convienience functions that return a default value that 
can be passed into the function when the expression evaluates to null.

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

Reply via email to