struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 17728] New: - EvalHelper should not throw NullAttributeException, it's too slow
Date Thu, 06 Mar 2003 15:22:18 GMT
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: struts-dev@jakarta.apache.org
        ReportedBy: ncoleman@leanlogistics.com


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: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message