Re: [bcel] Idea to share ConstantUtf8 of same value among JavaClass instances

2019-05-22 Thread Tomo Suzuki
Hi Gary and BCEL maintainers, I've added Javadoc for the enhancement. https://github.com/apache/commons-bcel/pull/26 I appreciate if you can check the direction of the implementation is good or bad. Regards, Tomo On Sun, May 19, 2019 at 11:40 PM Tomo Suzuki wrote: > Hi Gary (and BCEL

Re: [bcel] Idea to share ConstantUtf8 of same value among JavaClass instances

2019-05-19 Thread Tomo Suzuki
Hi Gary (and BCEL maintainers), Thank you for the comment. It has been addressed. Would you check the pull request? https://github.com/apache/commons-bcel/pull/26/files Regards, Tomo On Wed, May 8, 2019 at 17:46 Tomo Suzuki wrote: > Hi Gary, > Created a draft PR to receive feedback. >

Re: [bcel] Idea to share ConstantUtf8 of same value among JavaClass instances

2019-05-08 Thread Tomo Suzuki
Hi Gary, Created a draft PR to receive feedback. https://github.com/apache/commons-bcel/pull/26/files . What do you think? Regards, Tomo From: Gary Gregory Date: Wed, May 8, 2019 at 9:40 AM To: Commons Developers List > Great. I look forward to seeing what you'll come up with :-) > > On Tue,

Re: [bcel] Idea to share ConstantUtf8 of same value among JavaClass instances

2019-05-08 Thread Gary Gregory
Great. I look forward to seeing what you'll come up with :-) On Tue, May 7, 2019 at 4:27 PM Tomo Suzuki wrote: > I found the discussion on getInstance method had incurred performance > degradation https://issues.apache.org/jira/browse/BCEL-186 . > > From the JIRA: > > This feature could return

Re: [bcel] Idea to share ConstantUtf8 of same value among JavaClass instances

2019-05-07 Thread Tomo Suzuki
I found the discussion on getInstance method had incurred performance degradation https://issues.apache.org/jira/browse/BCEL-186 . >From the JIRA: > This feature could return as a pluggable cache if someone wants to provide a patch I'll think about the approach. Regards, Tomo On Thu, May 2,

Re: [bcel] Idea to share ConstantUtf8 of same value among JavaClass instances

2019-05-02 Thread Gary Gregory
On Thu, May 2, 2019 at 10:59 AM Tomo Suzuki wrote: > Gary, > I didn't find ConstantUtf8.getCachedInstance > > is used in BCEL (latest 6.3.1). I tried my custom ConstantUtf8

Re: [bcel] Idea to share ConstantUtf8 of same value among JavaClass instances

2019-05-02 Thread Tomo Suzuki
Gary, I didn't find ConstantUtf8.getCachedInstance is used in BCEL (latest 6.3.1). I tried my custom ConstantUtf8 modification to leverage getCachedInstance method and it worked well:

Re: [bcel] Idea to share ConstantUtf8 of same value among JavaClass instances

2019-05-01 Thread Gary Gregory
On Wed, May 1, 2019 at 6:37 PM Tomo Suzuki wrote: > Gary, > That’s right. I missed it. I think I just need to find a way to leverage > the getCachedInstance method. Thank you for quick response. > YW. Please let us know your outcome. Gary > > On Wed, May 1, 2019 at 18:00 Gary Gregory wrote:

Re: [bcel] Idea to share ConstantUtf8 of same value among JavaClass instances

2019-05-01 Thread Tomo Suzuki
Gary, That’s right. I missed it. I think I just need to find a way to leverage the getCachedInstance method. Thank you for quick response. On Wed, May 1, 2019 at 18:00 Gary Gregory wrote: > Why not use getCachedInstance() ? > > Gary > > On Wed, May 1, 2019 at 5:20 PM Tomo Suzuki > wrote: > > >

Re: [bcel] Idea to share ConstantUtf8 of same value among JavaClass instances

2019-05-01 Thread Gary Gregory
Why not use getCachedInstance() ? Gary On Wed, May 1, 2019 at 5:20 PM Tomo Suzuki wrote: > Hi BCEL developers, > > We use BCEL library to inspect Java class. Thank you for the great library. > > When our tool checks classes in ~200 jar files, it creates more than 2 > million BCEL ConstantUtf8

[bcel] Idea to share ConstantUtf8 of same value among JavaClass instances

2019-05-01 Thread Tomo Suzuki
Hi BCEL developers, We use BCEL library to inspect Java class. Thank you for the great library. When our tool checks classes in ~200 jar files, it creates more than 2 million BCEL ConstantUtf8 instances. I suspect many of them share the same values such as "java.lang.String". [image: