Optimise RESTEasy for closed world
See original GitHub issueProfling a Quarkus application it’s immediatley visible that the current RESTEasy extension isn’t taking advantage of the closed world assumption:
Annotation scanning and type introspection:
Stack Trace TLABs Total TLAB Size(bytes) Pressure(%)
java.lang.reflect.Method.getParameterTypes() 28 137,118,288 6.174
sun.reflect.annotation.AnnotationInvocationHandler.invoke(Object, Method, Object[]) 28 137,118,288 6.174
com.sun.proxy.$Proxy17.annotationType() 16 77,359,528 3.483
org.jboss.resteasy.spi.util.FindAnnotation.findAnnotation(Annotation[], Class) 16 77,359,528 3.483
org.jboss.resteasy.plugins.providers.sse.SseEventSinkInterceptor.filter(ContainerRequestContext) 16 77,359,528 3.483
And more…
Stack Trace TLABs Total TLAB Size(bytes) Pressure(%)
java.lang.Class.getInterfaces() 425 2,083,949,208 93.826
org.jboss.resteasy.core.providerfactory.Utils.createHeaderDelegateFromInterfaces(Map, Class[]) 219 1,071,276,576 48.233
org.jboss.resteasy.core.providerfactory.Utils.createHeaderDelegate(Map, Class) 206 1,012,672,632 45.594
I suppose this implies we can improve it a lot still?
The above methods have been identified when looking for strong allocators; this implies memory consumption could be cut down by dodging these operations.
Issue Analytics
- State:
- Created 4 years ago
- Comments:33 (32 by maintainers)
Top Results From Across the Web
RESTEasy JAX-RS - JBoss.org
RESTEasy is a portable implementation of these specifications which can run in any Servlet container. Tighter integration with WildFly application server is ...
Read more >15.8. RESTEasy Interceptors - Red Hat Customer Portal
RESTEasy GZIP support has interceptors that create and override the default Output and Input streams with a GzipOutputStream or GzipInputStream so that gzip ......
Read more >Getting started with RESTEasy - Rob Ferguson
In this post, I will walk you through the steps I followed when getting started with the RESTEasy framework. Prerequisites. OpenJDK for Java...
Read more >Best way to close async resteasy client call - Stack Overflow
If the client definition via JaxRS interface is ok for you, then the answer from rowing-goul above is the way to go.
Read more >Complete Tutorial | QUARKUS | JAX-RS | RESTEasy | Java
The MicroProfile project is aimed at optimizing Enterprise Java for ... to enter the world of programming - If you need advice on...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Adding @jamezp here. James, I think it might be worth isolating the possible improvements that could go into RESTEasy and create JIRAs for them.
Who is going to improve it? And where is the improvement going to go? If it’s in Quarkus (which I doubt anyone will do at this point), then it would make sense to leave the ticket open. But if the fix is going to be in RESTEasy, then it’s probably best to track it in the appropriate issue tracker