-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new space index: Jandex #106
Comments
I think using a Jandex index for just Sisu (which just needs all FQCNs of classes with a specific annotation) is way to much overhead. But maybe there are use cases where that index is already provided and used eslsewhere? @cstamas Can you elaborate a bit on the use case here? |
No use case, was just wondering how could we get rid of ASM altogether... just brainstorming here... |
Isn't that exactly what jandex has been created for ? You give the annotation and it just returns all its usage... |
No, jandex indices contain a lot more information. Information about all method signatures and also all fields for example. Just look at how big an index is. This is IMHO way too much overhead to just retrieve annotations set on class level. |
It's a tradeoff between runtime processing and storage obviously. |
IMHO this is just about finding |
Not only. ASM is used for more, gleaning the classes, no? Or is used only to scan, when no index present? |
Is think ASM is primarily used for generating the index or scanning when no index is in place (in https://github.com/eclipse/sisu.inject/blob/550bd96afa244d22ea0fc84bef5d9b0a356bac25/org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/space/SpaceScanner.java). There is one other edge case related to Dynamic Proxies in https://github.com/eclipse/sisu.inject/blob/550bd96afa244d22ea0fc84bef5d9b0a356bac25/org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/wire/DynamicGlue.java being referenced in https://github.com/eclipse/sisu.inject/blob/550bd96afa244d22ea0fc84bef5d9b0a356bac25/org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/wire/LocatorWiring.java#L213 but I have never seen the annotation I am pretty sure that all run-time usages could be easily replaced by reflection (as the inspected classes are part of the classpath) |
Jandex https://smallrye.io/jandex/jandex/3.1.6/core/browsing.html seems pretty much similar to Sisu Index but it does not use ASM and seems faster.
Could sisu be made to:
Basically "jandex" could be just another provider for index, with probably alt set of Space related classes and could this remove dep of Sisu on ASM?
The text was updated successfully, but these errors were encountered: