Col-E / Recaf

The modern Java bytecode editor
https://recaf.coley.software
MIT License
6.07k stars 467 forks source link

Reduce Recaf artifact size #882

Open Col-E opened 1 week ago

Col-E commented 1 week ago

Current size as of https://github.com/Col-E/Recaf/commit/2b3017f0866dc8e6c17fc325ac6ba6e620ade841 - 76 MB

Action items

Assuming all action items are taken (and best alternatives for multiple choice cases)

Col-E commented 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.