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

Performance: usage of String.format in ARSCDecoder.addMissingResSpecs #1186

Closed
dnault opened this Issue Mar 7, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@dnault

dnault commented Mar 7, 2016

ARSCDecoder.addMissingResSpecs calls String.format several thousand times in a tight loop. Replacing it with string concatenation significantly reduces the amount of time it takes to parse the Android framework (cuts it in half on my machine).

dnault pushed a commit to dnault/Apktool that referenced this issue Mar 7, 2016

Dave Nault
#1186 Performance: usage of String.format in ARSCDecoder.addMissingRe…
…sSpecs

Reduces the time it takes to parse the Android framework by ~50%.

The synthesized name now has no leading zeroes, but this doesn't appear to matter since the numeric part of the name isn't used anywhere.

@iBotPeaches iBotPeaches added the Accepted label Mar 7, 2016

@iBotPeaches iBotPeaches added this to the 2.1.0 milestone Mar 7, 2016

iBotPeaches added a commit that referenced this issue Mar 8, 2016

Merge pull request #1187 from dnault/bugfix/1186-framework-parsing-pe…
…rformance

#1186 Performance: usage of String.format in ARSCDecoder.addMissingResSpecs
@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 8, 2016

Owner

Fixed via - #1187

Owner

iBotPeaches commented Mar 8, 2016

Fixed via - #1187

@iBotPeaches iBotPeaches closed this Mar 8, 2016

Hikari-no-Tenshi referenced this issue in Hikari-no-Tenshi/Apktool Apr 12, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment