I'd like to remove some overhead on some of our requests, mostly the ajax requests that are doing some utility functions, or just sending metrics to our server.
I've profiled our code and can see these requests have a bottleneck at the HeadPipelineServlet (i.e. servlet pipeline).
Is there any way we can bypass certain steps for these requests, and remove some of the overhead. Lots of the steps in the daf pipeline aren't necessary for these.
We are on 9.4.
If you want to disable a pipeline servlet all together you can set the enable property of the pipeline servlet component to false.
If you want to disable it for certain request I can't think of any configuration to accomplish this.
One way is to extend the pipeline class and skip the whole logic based on request uri
You code will be something like this:
public class MyHeadPipelineServlet extends HeadPipelineServlet
public void service( DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse ) throws IOException, ServletException
if ( isEnabled() )
if( !pRequest.getRequestURI().startsWith( "/ajax" ) )
super.service( pRequest, pResponse );
Configure HeadPipelineServlet to use your class.