Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

performance with filters  RSS feed

 
Neeraj Vij
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have analyze an application for performance issues.

In my initial analysis of the application, it is using around25 Filters. Every filter is invoked using the url pattern <url-pattern>/*</url-pattern>

There is one Filter Authorizatiionfilter which is also used with <url-pattern>/*</url-pattern>. when the user logs in, the control comes to this filter around 20 times before displaying the next time.


is it good to use <url-pattern>/*</url-pattern> with every request and pass them on to every filter developed in the application before displaying a single page.

please provide the some inputs, the way filters improve/degrade the performance of the application.

Thanks,
Neeraj.


[BPSouther: fixed spelling in subject line]
[ June 18, 2007: Message edited by: Ben Souther ]
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wow, 25 servlet filters is a lot. What do they all do? Are all 25 called with each request? That sounds excessive.

JAMon can help you track down performance problems. Within a few minutes you can have summary stats for your apps sql, page hits, and log4j calls. All is documented in the link below.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Filters are primarily for pre and post precessing of the actual process.Are you planning to make a complete web application using filters ?

Got it from servlet specification :

It is expected that high performance web containers will cache filter chains so
that they do not need to compute them on a per request basis.

[ June 17, 2007: Message edited by: Rahul Bhattacharjee ]
 
Neeraj Vij
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for your inputs.

I have not created the application. I am involved in the maintenance.

I have tried to apply filters on basis of url and it has helped.

I will try to use the tool informed and inform.

Thanks again.
Neeraj.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!