You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Giovanni Azua <br...@swissonline.ch> on 2007/10/31 00:03:17 UTC

running findbugs vs S2 trunk ...

hi,

Recently I was following some threads in the Struts users list about
performance issues in S2 and was curious to look at Struts code. Running
findBugs evidences many small improvements that would overall and cheaply
improve S2 performance e.g.

- In many places it is continuously creating large number of small objects
by using new rather than valueOf. 
http://findbugs.sourceforge.net/bugDescriptions.html#DM_NUMBER_CTOR
- FindBugs spotted several places using non static inner classes
unnecessarily.
- Also a few places use inneficiently keySet iterators on maps rather than
using entrySet.
- Calling toString on String types.

Good idea probably adding findbugs to the pom reporting.

regards,
Giovanni

PS: tiny small improvements but they all count :) 



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


RE: running findbugs vs S2 trunk ...

Posted by Giovanni Azua <br...@swissonline.ch>.
Done! opened ticket WW-2282 and uploaded diff file containing all changes
ready to apply with patch.

I am anyway uploading a zip with the files too.

regards,
Giovanni 

> -----Original Message-----
> From: ted.husted@gmail.com [mailto:ted.husted@gmail.com] On 
> Behalf Of Ted Husted
> Sent: Wednesday, October 31, 2007 1:41 AM
> To: Struts Developers List
> Subject: Re: running findbugs vs S2 trunk ...
> 
> The most helpful thing would be to submit a patch with some 
> of these changes, and tag it for the Struts 1.1 release. The 
> best thing might be to submit a patch that constrains the 
> changes to a given package, or the same category of change 
> over several packages, so that it's easier to review.
> 
> -Ted.
> 
> On Oct 30, 2007 6:03 PM, Giovanni Azua 
> <br...@swissonline.ch> wrote:
> > hi,
> >
> > Recently I was following some threads in the Struts users 
> list about 
> > performance issues in S2 and was curious to look at Struts code. 
> > Running findBugs evidences many small improvements that 
> would overall 
> > and cheaply improve S2 performance e.g.
> >
> > - In many places it is continuously creating large number of small 
> > objects by using new rather than valueOf.
> > http://findbugs.sourceforge.net/bugDescriptions.html#DM_NUMBER_CTOR
> > - FindBugs spotted several places using non static inner classes 
> > unnecessarily.
> > - Also a few places use inneficiently keySet iterators on 
> maps rather 
> > than using entrySet.
> > - Calling toString on String types.
> >
> > Good idea probably adding findbugs to the pom reporting.
> >
> > regards,
> > Giovanni
> >
> > PS: tiny small improvements but they all count :)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For 
> additional commands, e-mail: dev-help@struts.apache.org
> 



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


Re: running findbugs vs S2 trunk ...

Posted by Ted Husted <hu...@apache.org>.
The most helpful thing would be to submit a patch with some of these
changes, and tag it for the Struts 1.1 release. The best thing might
be to submit a patch that constrains the changes to a given package,
or the same category of change over several packages, so that it's
easier to review.

-Ted.

On Oct 30, 2007 6:03 PM, Giovanni Azua <br...@swissonline.ch> wrote:
> hi,
>
> Recently I was following some threads in the Struts users list about
> performance issues in S2 and was curious to look at Struts code. Running
> findBugs evidences many small improvements that would overall and cheaply
> improve S2 performance e.g.
>
> - In many places it is continuously creating large number of small objects
> by using new rather than valueOf.
> http://findbugs.sourceforge.net/bugDescriptions.html#DM_NUMBER_CTOR
> - FindBugs spotted several places using non static inner classes
> unnecessarily.
> - Also a few places use inneficiently keySet iterators on maps rather than
> using entrySet.
> - Calling toString on String types.
>
> Good idea probably adding findbugs to the pom reporting.
>
> regards,
> Giovanni
>
> PS: tiny small improvements but they all count :)

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