Repository navigation
Commit 9b709b9
committed
perf(r8): keep exception names without keeping every exception
-keep public class * extends java.lang.Throwable kept 972 classes whole. Only
their names are load-bearing: the Coinbase onramp traces send
`it::class.simpleName` as `errorType`, and Events.kt does the same for
analytics. Those have become plain strings by the time they leave the device,
so the Bugsnag mapping upload cannot repair them, which is why the rule cannot
simply be deleted.
Nothing reads the members, and an exception nothing constructs need not
survive, so -keepnames is the rule that matches the requirement.
Release R8 drops 341 classes and 455 members, and DEX falls 72,628 bytes
(16,101,032 -> 16,028,404). The dropped classes are what the old rule was
propping up: AddReactionError and its six subclasses go, because
ChatMessagingService.addReaction has no caller outside tests and R8 had
already shrunk it in both builds. CoinbaseOnRampApiError and GetJwtError
subclass names are unchanged in the mapping.
Also corrects two comments against what the code does. The AppRoute rule is
not for analytics: annotatedEntry derives each screen's root test tag from the
route's simple name via NavMetadata.screenRootTag, so obfuscating those renames
the resource-ids the UI tests address. The com.kik.scan wildcard is load-bearing
for JNI, which constructs those classes by name from C++ and reads their
backing fields through GetFieldID.1 parent 7b22251 commit 9b709b9
1 file changed
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| |||
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
29 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
0 commit comments