Open Col-E opened 1 week ago
For fastutil, these are the classes we and transitive dependencies import.
it.unimi.dsi.fastutil.Hash.Strategy;
it.unimi.dsi.fastutil.bytes.ByteIterator;
it.unimi.dsi.fastutil.chars.Char2IntArrayMap;
it.unimi.dsi.fastutil.chars.Char2IntMap;
it.unimi.dsi.fastutil.chars.Char2ObjectArrayMap;
it.unimi.dsi.fastutil.chars.Char2ObjectMap;
it.unimi.dsi.fastutil.chars.CharArraySet;
it.unimi.dsi.fastutil.chars.CharSet;
it.unimi.dsi.fastutil.ints.Int2IntArrayMap;
it.unimi.dsi.fastutil.ints.Int2IntLinkedOpenHashMap;
it.unimi.dsi.fastutil.ints.Int2IntMap;
it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap;
it.unimi.dsi.fastutil.ints.Int2IntSortedMap;
it.unimi.dsi.fastutil.ints.Int2ObjectAVLTreeMap;
it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap;
it.unimi.dsi.fastutil.ints.Int2ObjectMap.Entry;
it.unimi.dsi.fastutil.ints.Int2ObjectMap;
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
it.unimi.dsi.fastutil.ints.Int2ObjectRBTreeMap;
it.unimi.dsi.fastutil.ints.Int2ObjectSortedMap;
it.unimi.dsi.fastutil.ints.Int2ReferenceAVLTreeMap;
it.unimi.dsi.fastutil.ints.Int2ReferenceArrayMap;
it.unimi.dsi.fastutil.ints.Int2ReferenceLinkedOpenHashMap;
it.unimi.dsi.fastutil.ints.Int2ReferenceMap.Entry;
it.unimi.dsi.fastutil.ints.Int2ReferenceMap;
it.unimi.dsi.fastutil.ints.Int2ReferenceMaps;
it.unimi.dsi.fastutil.ints.Int2ReferenceOpenHashMap;
it.unimi.dsi.fastutil.ints.Int2ReferenceRBTreeMap;
it.unimi.dsi.fastutil.ints.Int2ReferenceSortedMap;
it.unimi.dsi.fastutil.ints.Int2ReferenceSortedMaps;
it.unimi.dsi.fastutil.ints.IntArrayList;
it.unimi.dsi.fastutil.ints.IntBidirectionalIterator;
it.unimi.dsi.fastutil.ints.IntList;
it.unimi.dsi.fastutil.ints.IntOpenHashSet;
it.unimi.dsi.fastutil.ints.IntSet;
it.unimi.dsi.fastutil.ints.IntSortedSet;
it.unimi.dsi.fastutil.longs.Long2ReferenceMap;
it.unimi.dsi.fastutil.longs.Long2ReferenceOpenHashMap;
it.unimi.dsi.fastutil.objects.Object2BooleanArrayMap;
it.unimi.dsi.fastutil.objects.Object2BooleanMap.Entry;
it.unimi.dsi.fastutil.objects.Object2BooleanMap;
it.unimi.dsi.fastutil.objects.Object2CharArrayMap;
it.unimi.dsi.fastutil.objects.Object2CharMap;
it.unimi.dsi.fastutil.objects.Object2IntLinkedOpenHashMap;
it.unimi.dsi.fastutil.objects.Object2IntMap;
it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
it.unimi.dsi.fastutil.objects.Object2LongMap;
it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap;
it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenCustomHashMap;
it.unimi.dsi.fastutil.objects.Object2ObjectMap;
it.unimi.dsi.fastutil.objects.Object2ObjectRBTreeMap;
it.unimi.dsi.fastutil.objects.Object2ObjectSortedMap.FastSortedEntrySet;
it.unimi.dsi.fastutil.objects.Object2ReferenceLinkedOpenHashMap;
it.unimi.dsi.fastutil.objects.ObjectIterator;
it.unimi.dsi.fastutil.objects.Reference2BooleanMap.Entry;
it.unimi.dsi.fastutil.objects.Reference2BooleanMap;
it.unimi.dsi.fastutil.objects.Reference2BooleanMaps;
it.unimi.dsi.fastutil.objects.Reference2BooleanOpenHashMap;
it.unimi.dsi.fastutil.objects.Reference2IntLinkedOpenHashMap;
it.unimi.dsi.fastutil.objects.Reference2IntMap.Entry;
it.unimi.dsi.fastutil.objects.Reference2IntMap;
it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap;
it.unimi.dsi.fastutil.objects.Reference2ReferenceMap;
it.unimi.dsi.fastutil.objects.Reference2ReferenceOpenHashMap;
Can probably do some basic analysis and see all the classes we need to support these uses and then toss everything else.
Current size as of https://github.com/Col-E/Recaf/commit/2b3017f0866dc8e6c17fc325ac6ba6e620ade841 -
76 MB
Action items
-30 MB
Remove unusedfastutil
collection implementationsCan create aActually no we can't - packaging only a select few classes from transitive dependencies is broken inshadowJar
output filter for thisshadowJar
-10 MB
Remove it + transitive dependenciesjavac
AST similiar to how OpenRewrite does things, but more lean-7 MB
Remove unused transitive dependencies-9 MB
Remove R8 in favor of dex-4 MB
Remove Jackson dependency and storeAndroidRes
data in JSON instead of XML[ ]
-4 MB
Strip debug info from dependencies (after the above steps)Summary
Assuming all action items are taken (and best alternatives for multiple choice cases)
-53 MB
in potential removed data leading to a23 MB
fat-jar