Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Keep line number information, useful for stack traces. | 1 # Keep line number information, useful for stack traces. |
| 2 -keepattributes SourceFile,LineNumberTable | 2 -keepattributes SourceFile,LineNumberTable |
| 3 | 3 |
| 4 # Keep all runtime visible annotations | 4 # Keep all runtime visible annotations |
| 5 -keepattributes RuntimeVisibleAnnotations | 5 -keepattributes RuntimeVisibleAnnotations |
| 6 | 6 |
| 7 # Keep the annotations, because if we don't, the ProGuard rules that use them | 7 # Keep the annotations, because if we don't, the ProGuard rules that use them |
| 8 # will not be respected. These classes then show up in our final dex, which we | 8 # will not be respected. These classes then show up in our final dex, which we |
| 9 # do not want - see crbug.com/628226. | 9 # do not want - see crbug.com/628226. |
| 10 -keep @interface org.chromium.base.annotations.AccessedByNative | 10 -keep @interface org.chromium.base.annotations.AccessedByNative |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 | 43 |
| 44 # Allows Proguard freedom in removing these log related calls. We ask for debug | 44 # Allows Proguard freedom in removing these log related calls. We ask for debug |
| 45 # and verbose logs to be stripped out in base.Log, so we are just ensuring we | 45 # and verbose logs to be stripped out in base.Log, so we are just ensuring we |
| 46 # get rid of all other debug/verbose logs. | 46 # get rid of all other debug/verbose logs. |
| 47 -assumenosideeffects class android.util.Log { | 47 -assumenosideeffects class android.util.Log { |
| 48 static *** d(...); | 48 static *** d(...); |
| 49 static *** v(...); | 49 static *** v(...); |
| 50 static *** isLoggable(...); | 50 static *** isLoggable(...); |
| 51 } | 51 } |
| 52 | 52 |
| 53 # The following chart was created on July 20, 2016, to decide on 3 optimization | |
| 54 # passes. | |
|
Yaron
2016/07/20 17:10:05
child process dirty memory, right? not browser. wo
| |
| 55 # optimization passes | time | .dex size | dirty memory | |
| 56 # ----------------------------------------------------- | |
| 57 # 1 | 0:48 | 5805676 | 488972 | |
| 58 # 2 | 1:07 | 5777376 | 487092 | |
| 59 # 3 | 1:24 | 5772192 | 486596 | |
| 60 # 4 | 1:42 | 5771124 | 486484 | |
| 61 # 5 | 1:56 | 5770504 | 486432 | |
| 62 -optimizationpasses 3 | |
| 63 | |
| 53 # Class merging provides negligible .dex size reduction and method count | 64 # Class merging provides negligible .dex size reduction and method count |
| 54 # reduction (about 0.3% improvement on method count, and 0.1% savings on size), | 65 # reduction (about 0.3% improvement on method count, and 0.1% savings on size), |
| 55 # and it messes up stack traces if the classes are optimized. Thus, it is in our | 66 # and it messes up stack traces if the classes are optimized. Thus, it is in our |
| 56 # best interests to turn it off. See crbug.com/620323 | 67 # best interests to turn it off. See crbug.com/620323 |
| 57 -optimizations !class/merging/* | 68 -optimizations !class/merging/* |
| 58 | 69 |
| 59 # Allowing Proguard to change modifiers. This change shrinks the .dex size by | 70 # Allowing Proguard to change modifiers. This change shrinks the .dex size by |
| 60 # ~1.1%, and reduces the method count by ~4.3%. | 71 # ~1.1%, and reduces the method count by ~4.3%. |
| 61 -allowaccessmodification | 72 -allowaccessmodification |
| 62 | 73 |
| 63 # Keep all enum values and valueOf methods. See | 74 # Keep all enum values and valueOf methods. See |
| 64 # http://proguard.sourceforge.net/index.html#manual/examples.html | 75 # http://proguard.sourceforge.net/index.html#manual/examples.html |
| 65 # for the reason for this. Also, see http://crbug.com/248037. | 76 # for the reason for this. Also, see http://crbug.com/248037. |
| 66 -keepclassmembers enum * { | 77 -keepclassmembers enum * { |
| 67 public static **[] values(); | 78 public static **[] values(); |
| 68 public static ** valueOf(java.lang.String); | 79 public static ** valueOf(java.lang.String); |
| 69 } | 80 } |
| OLD | NEW |