-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Feature: Parallel Building #3476
Conversation
Note: backsmali can't be properly multithreaded because of the synchronized methods inside
Now we're not compressing the same data twice
Interesting in timing how we got 1 PR doing ParallelStreams and this one doing an executor service. It what I was basically responding to in this other pr: #3411 (comment) In short - thanks, let me review this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a quick static look. I have time this weekend to pull it down and do some testing.
brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkBuilder.java
Outdated
Show resolved
Hide resolved
brut.apktool/apktool-lib/src/main/java/brut/androlib/BackgroundWorker.java
Show resolved
Hide resolved
brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkBuilder.java
Outdated
Show resolved
Hide resolved
Another suggestion is to change the Gradle distribution from |
We did swap from bin -> all a few years ago for some reason. Forgot why. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran some tests and I like it. I'll put in another PR shortly to:
- Make jobs configurable
- Explain how many jobs are running in info message at start of build
- Remove unused method in ZipUtils
Thanks! I thought about defining the thread count and found that setting the number in the Main class (or setting it to 1 if a debug flag is set) via a public field is the best solution. This is because you probably won't have any reason to change it in the middle of decompiling. |
Here are my performance optimizations that aim to minimize changes to the codebase and do not use any external libraries (although Apache Compress seems like a nice one).
Best numbers (30mb apk, 3 dex files, 4 CPU cores) for a 10-minute benchmark:
25% means one core load