users@jersey.java.net

Re: [Jersey] Performance of ContainerRequestFilter implementation

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 05 Jun 2009 12:39:39 -0700

Hi Ross,

The following is the code to call the request filters (in
WebApplicationImpl):

private void _handleRequest(final WebApplicationContext localContext,
             ContainerRequest request, ContainerResponse response)
throws IOException {
         try {
             for (ContainerRequestFilter f :
filterFactory.getRequestFilters()) {
                 request = f.filter(request);
                 localContext.setContainerRequest(request);
             }

So it may be because of stuff the filter is doing, or doing to Jersey
that may be causing an issue?

Would it be possible to get some profiling data?

Paul.

On Jun 5, 2009, at 12:41 AM, Ross McDonald wrote:

> Hi Guys.
>
> Just wondering if anyone can tell me much about the performance of
> ContainerRequestFilter implementations. I have created a very
> simple implementation, looking at basic auth headers, using
> temporarily the Base64 example from the Jersey examples. To keep
> things incredibly simple I have just hardcoded users and passwords
> for the authentication aspect. When I plugged the filter in to my
> web.xml, my load test results using Apache Benchmark worsened
> drastically. Has anyone else experienced anything similar ?
>
> Thanks in advance for your help,
>
> - Ross