You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/07/03 19:26:08 UTC

DO NOT REPLY [Bug 49547] New: Minor performance enhancement in set result evaluation

https://issues.apache.org/bugzilla/show_bug.cgi?id=49547

           Summary: Minor performance enhancement in set result evaluation
           Product: Taglibs
           Version: 1.2.0
          Platform: PC
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Standard Taglib
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: jboynes@apache.org


Eliminate one comparison when evaluating body content as the content of "value"
attribute can always be used when it has been specified.

Jasper's implementation of BodyContent#getString() constructs a new value each
time so only call it once to avoid an unnecessary object creation.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 49547] Minor performance enhancement in set result evaluation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49547

Henri Yandell <ba...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Henri Yandell <ba...@apache.org> 2010-07-03 15:35:24 EDT ---
Agreed that the contract would be that both must be set. 

I've added javadoc that the two attributes must be in sync as a part of this
commit:

svn ci -m "Improving the performance of SetSupport by only calling
bodyContent.getString() once per Jeremy's patch #49547"Sending       
impl/src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java
Sending       
impl/src/test/java/org/apache/taglibs/standard/tag/common/core/TestSetSupport.java
Transmitting file data ..
Committed revision 960259.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 49547] Minor performance enhancement in set result evaluation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49547

Jeremy Boynes <jb...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 49547] Minor performance enhancement in set result evaluation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49547

--- Comment #3 from Jeremy Boynes <jb...@apache.org> 2010-07-03 14:53:00 EDT ---
value and valueSpecified are both protected variables and part of our
implementation rather than the spec. The container will just call
setValue(Object) to set the attribute's value and both our subclasses set both
variables in their implementation.

My thought was that the contract this has with its subclasses is that both must
be set and if that is met the change works. The original tests I added weren't
doing that which was why it was OK to change them.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 49547] Minor performance enhancement in set result evaluation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49547

--- Comment #1 from Jeremy Boynes <jb...@apache.org> 2010-07-03 13:27:20 EDT ---
Created an attachment (id=25692)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25692)
patch to remove one check and a unneeded call to BodyContent#getString

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 49547] Minor performance enhancement in set result evaluation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49547

Henri Yandell <ba...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
         OS/Version|                            |All

--- Comment #2 from Henri Yandell <ba...@apache.org> 2010-07-03 14:13:05 EDT ---
There's a functionality change here:

If valueSpecified is false, yet there is a value, it used to return value. Now
it returns bodyContent based results. 

I don't see this being in the spec, so presumably this is bad design that we're
stuck with supporting; a protected status variable in addition to the main one,
rather than a 'isValueSpecified()' method. 

Thoughts?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org