Skip to content

Conversation

@supersaiyansubtlety
Copy link
Member

@supersaiyansubtlety supersaiyansubtlety commented Dec 3, 2025

Supersedes #344

Fixes excessive memory usage introduced in #306 by:

  • making CombinedJarIndex's EntyIndex, ReferenceIndex, and BridgeMethodIndex actual combinations of MainJarIndex's and LibraryJarIndex's indexes
  • removing Enigma's mainReferencedPredicate; it was just wasted overhead since the number of libs classes is tiny
  • BREAKING not running custom indexers over CombinedJarIndex's classes; they already ran over main's and lib's restored: performance is fine with it; avoids breaking indexers that need the combined scope all at once

Implementing proper combining for just EntyIndex and ReferenceIndex was enough to fix performance (I did EntryIndex first, so just ReferenceIndex might be enough); it ran fine before I combined BridgeMethodIndexes.

It's probably possible to combine InheritanceIndexes, too, but it could be considerably more complex and might involve the combined index actually doing some of its own indexing.
Same goes for LambdaIndexes.


BREAKING (maybe*): the combined ReferenceIndex does not currently index references from the main jar to libs; it's just a combination of the main and lib ReferenceIndexes.
*Not sure if this is actually true and not sure how to check.

minor breakage:

  • converts EntyIndex, ReferenceIndex, and BridgeMethodIndex into sealed interfaces with hidden implementations; they're no longer instantiable or extendable by users (probably not intended to be instantiable or extendable anyways)
  • makes CombinedJarIndex final and its constructor private (not intended for extension anyway)

make CombinedJarIndex's EntryIndex a combination of MainJarIndex's and LibrariesJarIndex's
make CombinedJarIndex's ReferenceIndex a combination of MainJarIndex's and LibrariesJarIndex's; does NOT currently index references from main to lib
@supersaiyansubtlety supersaiyansubtlety self-assigned this Dec 3, 2025
@supersaiyansubtlety supersaiyansubtlety added bug Something isn't working backend affects the enigma backend labels Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend affects the enigma backend bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant