[resteasy-dev] Caching of ResteasyUriInfo in org.jboss.resteasy.plugins.server.servlet.ServletUtil

John O'Hara johara at redhat.com
Thu Oct 25 05:42:50 EDT 2018


During a benchmark run, we are seeing over 5% of cpu time taken up by each
request creating a new ResteasyUriInfo instance. Please see the attached
graph.

For most use cases in our application, the parameters are the same between
requests, and therefore the ResteasyUriInfo are immutable and could be
shared. The case that I can see where sharing a ResteasyUriInfo would be
problematic is when there are path parameters in the URI.

Could it be possible to cache ResteasyUriInfo that are immutable, or even
cache a URI with placeholders for URI that contain path parameters?

IIRC hibernate has a similar caching mechanism for prepared statements with
parameters, a similar approach may work here.

Thanks,

John

-- 

JOHN O'HARA

PRINCIPAL SOFTWARE ENGINEER

Red Hat <https://www.redhat.com/>
<https://red.ht/sig>
TRIED. TESTED. TRUSTED. <https://redhat.com/trusted>
@redhat <https://twitter.com/redhat>   @redhatinc
<https://instagram.com/redhatinc>   @redhatsnaps
<https://snapchat.com/add/redhatsnaps>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/resteasy-dev/attachments/20181025/40164a24/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2018-10-25 10-32-11.png
Type: image/png
Size: 199644 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/resteasy-dev/attachments/20181025/40164a24/attachment-0001.png 


More information about the resteasy-dev mailing list