mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Changed ProGuard settings so it will inline methods which use private members. This eliminates tens of thousands of function calls to BitArray.get() on a typical decode, and lots of other work as well. Overall we're roughly 20% faster by using ProGuard than turning it off.
git-svn-id: https://zxing.googlecode.com/svn/trunk@356 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
0b7bface5b
commit
e14defda5f
|
@ -147,10 +147,15 @@
|
|||
<arg value="-libraryjars ${android-jar}"/>
|
||||
<arg value="-dontpreverify"/>
|
||||
<arg value="-dontobfuscate"/>
|
||||
<arg value="-keep public class com.google.zxing.client.android.BarcodeReaderCaptureActivity"/>
|
||||
<!-- Temporary workaround to keep important stuff in the client, while inlining core. -->
|
||||
<arg value="-keep class com.google.zxing.client.android.BarcodeReaderCaptureActivity { *; }"/>
|
||||
<arg value="-keep class com.google.zxing.client.android.CameraManager { *; }"/>
|
||||
<arg value="-keep class com.google.zxing.client.android.CameraThread { *; }"/>
|
||||
<arg value="-optimizationpasses 7"/>
|
||||
<arg value="-overloadaggressively"/>
|
||||
<arg value="-verbose"/>
|
||||
<!-- Needed to allow getters which refer to private members to be inlined. -->
|
||||
<arg value="-allowaccessmodification"/>
|
||||
</java>
|
||||
<delete file="temp.jar"/>
|
||||
<delete dir="${outdir-classes}"/>
|
||||
|
@ -182,6 +187,7 @@
|
|||
<exec executable="${dx}" failonerror="true">
|
||||
<arg value="-JXmx384M"/>
|
||||
<arg value="--dex"/>
|
||||
<arg value="--optimize"/>
|
||||
<arg value="--output=${intermediate-dex}"/>
|
||||
<arg value="--locals=${locals}"/>
|
||||
<arg value="--positions=${positions}"/>
|
||||
|
|
Loading…
Reference in a new issue