question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Optimise RESTEasy for closed world

See original GitHub issue

Profling 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:closed
  • Created 4 years ago
  • Comments:33 (32 by maintainers)

github_iconTop GitHub Comments

1reaction
asoldanocommented, Jul 29, 2021

Adding @jamezp here. James, I think it might be worth isolating the possible improvements that could go into RESTEasy and create JIRAs for them.

1reaction
geoandcommented, Jul 29, 2021

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found