2014-09-27 11:50 GMT+04:00 Emmanuel Bourg <ebo...@apache.org>:
> Hi all,
>
> The third release candidate of BCEL is ready to pass under your scrutiny.
>
> Tag:
> http://svn.apache.org/repos/asf/commons/proper/bcel/tags/BCEL_6_0_RC3/
> (r1627908)
>
> Release notes:
> http://people.apache.org/~ebourg/bcel/RELEASE-NOTES.txt
>
> Distribution files:
> http://people.apache.org/~ebourg/bcel/
>
> Checksums (sha1):
> 6f1d11224b7cea98ffbffa25d69d759fcd47421c  bcel-6.0-bin.tar.gz
> 425729b886f72481bdbfc7e8ca108f20c00e67ef  bcel-6.0-bin.zip
> 89e171be63df397d23ea746f9845cf3087e8467e  bcel-6.0-src.tar.gz
> a03c2e605b8eb997b5d023d6a7d6aa54fbf3600e  bcel-6.0-src.zip
>
> Site:
> http://people.apache.org/~ebourg/bcel/site/
>
> Javadoc:
> http://people.apache.org/~ebourg/bcel/site/apidocs/
>
> Maven artifacts:
> https://repository.apache.org/content/repositories/orgapachecommons-1047/org/apache/bcel/bcel/6.0/
>

Hi!

I was reviewing the Clirr report and noted new methods that introduced
caching into classfile.ConstantUtf8  class,
such as methods ConstantUtf8.getCachedInstance()


The code originates from the following commit and JIRA issue:

http://svn.apache.org/r1481383
https://issues.apache.org/jira/browse/BCEL-163

I have the following concerns:

1) Someone was testing Tomcat usage of BCEL and found that using this
caching did not improve performance, but reduced it for our use case.
It was reported in the following Bugzilla issue:

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

2) Configuration of this cache depends on reading System properties such as

final static boolean BCEL_DONT_CACHE = Boolean.getBoolean("bcel.dontCache");

It is a bit odd to me to configure a library via system properties.

At least there could be a static setter for that flag, or a static
setter for a cache instance / a factory class.

3) RELEASE-NOTES.txt describes this change as

[BCEL-163] Incorporate patch file from Findbugs

which does not say much about this change.

Actually this change introduced caching for ConstantUtf8 and
ObjectType instances.


My experience with BCEL comes from Apache Tomcat. Tomcat uses a copy
of BCEL code. It is used to perform scanning for class-level
annotations across class files. During profiling and refactoring
several weeks ago a lot of code that is not needed for our use case
was removed from our copy. The caching code was one of them.


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to