[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: [jira] [Updated] (BCEL-317) Pluggable cache for ConstantUtf8
From: "Tomo Suzuki (JIRA)" <jira () apache ! org>
Date: 2019-05-31 17:42:00
Message-ID: JIRA.13232330.1557350438000.379841.1559324520303 () Atlassian ! JIRA
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/BCEL-317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]
Tomo Suzuki updated BCEL-317:
-----------------------------
Description:
Follow-up of BCEL-186. This enhancement is to provide an option to cache \
ConstantUtf8 instances that have the same value.
Email thread: [bcel] Idea to share ConstantUtf8 of same value among JavaClass \
instances
--------------------
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".
Without cache, my tool created 2,6 million ConstantUtf8 instances (before failing \
OutOfMemoryError: GC overhead limit exceeded) to check ~200 jar files.
!2644k_constantutf8_without_getCachedInstance.png!
With the cache, my tool created just 0.6 million ConstantUtf8 instances. It didn't \
throw the OutOfMemoryError.
!621k_constantutf8_with_getCachedInstance.png!
Old commit that made ConstantUtf8.getInstance \
[https://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Constant.java?r1=1481383&r2=1481382&pathrev=1481383]
The ConstantUtf8.getInstance has been unused in BCEL since BCEL-186 \
[http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantUtf8.java?r1=1652541&r2=1652540&pathrev=1652541]
h1. How our project uses BCEL
Our tool (Linkage Checker) creates BCEL's ClassPathRepository with around 200 JAR \
files as its input class path \
([ClassDumper.createClassRepository|https://github.com/GoogleCloudPlatform/cloud-opens \
ource-java/blob/239fb82e368b2c181e358359f758b33c0a122787/dependencies/src/main/java/com/google/cloud/tools/opensource/classpath/ClassDumper.java#L83]) \
and reads JavaClass one by one \
([ClassDumper.listClassesInJar|https://github.com/GoogleCloudPlatform/cloud-opensource \
-java/blob/239fb82e368b2c181e358359f758b33c0a122787/dependencies/src/main/java/com/google/cloud/tools/opensource/classpath/ClassDumper.java#L360]) \
through the ClassPathRepository.
was:
Follow-up of https://issues.apache.org/jira/browse/BCEL-186. This enhancement is to \
provide an option to cache ConstantUtf8 instances that have the same value.
Email thread: [bcel] Idea to share ConstantUtf8 of same value among JavaClass \
instances
--------------------
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".
Without cache, my tool created 2,6 million ConstantUtf8 instances (before failing \
OutOfMemoryError: GC overhead limit exceeded) to check ~200 jar files.
!2644k_constantutf8_without_getCachedInstance.png!
With the cache, my tool created just 0.6 million ConstantUtf8 instances. It didn't \
throw the OutOfMemoryError.
!621k_constantutf8_with_getCachedInstance.png!
Old commit that made ConstantUtf8.getInstance \
[https://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Constant.java?r1=1481383&r2=1481382&pathrev=1481383]
h1. How our project uses BCEL
Our tool (Linkage Checker) creates BCEL's ClassPathRepository with around 200 JAR \
files as its input class path \
([ClassDumper.createClassRepository|https://github.com/GoogleCloudPlatform/cloud-opens \
ource-java/blob/239fb82e368b2c181e358359f758b33c0a122787/dependencies/src/main/java/com/google/cloud/tools/opensource/classpath/ClassDumper.java#L83]) \
and reads JavaClass one by one \
([ClassDumper.listClassesInJar|https://github.com/GoogleCloudPlatform/cloud-opensource \
-java/blob/239fb82e368b2c181e358359f758b33c0a122787/dependencies/src/main/java/com/google/cloud/tools/opensource/classpath/ClassDumper.java#L360]) \
through the ClassPathRepository.
> Pluggable cache for ConstantUtf8
> --------------------------------
>
> Key: BCEL-317
> URL: https://issues.apache.org/jira/browse/BCEL-317
> Project: Commons BCEL
> Issue Type: Improvement
> Components: Main
> Affects Versions: 6.3.1
> Reporter: Tomo Suzuki
> Priority: Minor
> Attachments: 2644k_constantutf8_without_getCachedInstance.png, \
> 621k_constantutf8_with_getCachedInstance.png
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Follow-up of BCEL-186. This enhancement is to provide an option to cache \
> ConstantUtf8 instances that have the same value.
> Email thread: [bcel] Idea to share ConstantUtf8 of same value among JavaClass \
> instances
> --------------------
> 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".
> Without cache, my tool created 2,6 million ConstantUtf8 instances (before failing \
> OutOfMemoryError: GC overhead limit exceeded) to check ~200 jar \
> files.
> !2644k_constantutf8_without_getCachedInstance.png!
>
> With the cache, my tool created just 0.6 million ConstantUtf8 instances. It didn't \
> throw the OutOfMemoryError.
> !621k_constantutf8_with_getCachedInstance.png!
>
> Old commit that made ConstantUtf8.getInstance \
> [https://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Constant.java?r1=1481383&r2=1481382&pathrev=1481383]
> The ConstantUtf8.getInstance has been unused in BCEL since BCEL-186 \
> [http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantUtf8.java?r1=1652541&r2=1652540&pathrev=1652541]
>
> h1. How our project uses BCEL
> Our tool (Linkage Checker) creates BCEL's ClassPathRepository with around 200 JAR \
> files as its input class path \
> ([ClassDumper.createClassRepository|https://github.com/GoogleCloudPlatform/cloud-ope \
> nsource-java/blob/239fb82e368b2c181e358359f758b33c0a122787/dependencies/src/main/java/com/google/cloud/tools/opensource/classpath/ClassDumper.java#L83]) \
> and reads JavaClass one by one \
> ([ClassDumper.listClassesInJar|https://github.com/GoogleCloudPlatform/cloud-opensour \
> ce-java/blob/239fb82e368b2c181e358359f758b33c0a122787/dependencies/src/main/java/com/google/cloud/tools/opensource/classpath/ClassDumper.java#L360]) \
> through the ClassPathRepository.
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic