Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: 2x speed up reading contents from zip/jar #761

Merged
merged 5 commits into from
Jan 19, 2024

Conversation

1fxe
Copy link
Contributor

@1fxe 1fxe commented Jan 18, 2024

This specific optimistaions is targeted towards JVM Class resources, in is isAsmCompliantClass we would read the class and check for custom attributes, then we would read the class again to build the class info in this pr I merged the functionality of isASMCompliantClass into ClassBuilderAppender

What's new

Before ~ 5746ms on a 100mb jar
image

After ~ 2823ms
image

1fxe

This comment was marked as resolved.

This specific optimistaions is targeted towards JVM Class resources, in
is isAsmCompliantClass we would read the class and check for custom
attributes, then we would read the class again to build the class info
in this pr I merged the functionality of isASMCompliantClass into
ClassBuilderAppender
@1fxe 1fxe force-pushed the improve-import-speed branch from 15f3790 to 127989f Compare January 18, 2024 14:24
@1fxe 1fxe changed the title perf: 2x speed up reading contents from zip perf: 2x speed up reading contents from zip/jar Jan 18, 2024
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 27 lines in your changes are missing coverage. Please review.

Comparison is base (3e624e8) 66.85% compared to head (9a8a032) 66.85%.

Files Patch % Lines
.../coley/recaf/info/builder/JvmClassInfoBuilder.java 47.91% 21 Missing and 4 partials ⚠️
...re/coley/recaf/workspace/io/BasicInfoImporter.java 86.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               dev4     #761      +/-   ##
============================================
- Coverage     66.85%   66.85%   -0.01%     
+ Complexity     2410     2406       -4     
============================================
  Files           323      322       -1     
  Lines         13934    13925       -9     
  Branches       1584     1584              
============================================
- Hits           9316     9309       -7     
+ Misses         3896     3894       -2     
  Partials        722      722              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@1fxe 1fxe marked this pull request as ready for review January 18, 2024 15:17
@Col-E
Copy link
Owner

Col-E commented Jan 19, 2024

I oughta look into keeping codecov but not having it "fail" the build...

@1fxe 1fxe marked this pull request as draft January 19, 2024 01:20
@1fxe 1fxe force-pushed the improve-import-speed branch from 5281ac4 to 0bef105 Compare January 19, 2024 03:01
Changed flag to skipCustomAttributeChecks and made it true by default
since we should only be checking this from InfoImporter, we should be
ignoring for jvm bundles for example. Also added back the
skipASMValidation check to make sure parity is the same
@1fxe 1fxe force-pushed the improve-import-speed branch from 0bef105 to 211b9d1 Compare January 19, 2024 03:05
Copy link
Contributor Author

@1fxe 1fxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok looks good to me

@1fxe 1fxe marked this pull request as ready for review January 19, 2024 03:07
@Col-E Col-E force-pushed the improve-import-speed branch from 11894f1 to 9a8a032 Compare January 19, 2024 12:10
@Col-E Col-E merged commit 50ceacb into Col-E:dev4 Jan 19, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants