Skip to content
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

Optimise RESTEasy for closed world #235

Closed
snowdrop-bot opened this issue Dec 15, 2020 · 0 comments
Closed

Optimise RESTEasy for closed world #235

snowdrop-bot opened this issue Dec 15, 2020 · 0 comments

Comments

@snowdrop-bot
Copy link
Collaborator

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.


quarkusio#4345


u p s t r e a m : 4345

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants