I have never worked on any performance related issue. Recently i got a task where i need to find out that how the performance of a web application can be improved.
Its a simple web application having ejbs,servlets and jdbc. Through GUI a job can be created which is basically a quartz job and it executes at specified time. Some times some of these jobs does not complete and keeps on running because they have large data to process. So i have been asked to improve the performance of these kinds of jobs. How should i move ahead ? Please advice.
1. Find a way to process less data.
2. Find a way to process the data more efficiently.
Use one or both of the above.
In the case of database-related performance problems, one of the first things to do is determine how much of the overhead is in the webserver and how much is in the database. A lot of times, optimizing the database operations can result in big gains. For that, it's good to be friends with the DBA. Also to learn how EXPLAIN works.
Sometimes you can get a big boost by moving expensive processing from the appserver to the database server. I'm not a big fan of stored procedures for trivial purposes, but sometimes just doing the "heavy" lifting in the DB server can reap big dividends. Of course, that can cause the DBA to Have Words with you, so you may have to justify the business need.
Of course, the real irony in performance improvement these days is that a lot of companies would rather have you spend time manually figuring out what's wrong instead of budgeting up for some good measurement software. After all, your time is "free" and this is one area where the free solutions are fairly thin.
Don't forget that Java doesn't run in a vacuum, either. Check OS-level performance as well. A badly-tuned OS can be just as much grief as a badly-tuned appserver or badly-tuned database.
Customer surveys are for companies who didn't pay proper attention to begin with.
I would suggest taking a more bird eye view in identify J2EE performance issue. Here are some of the problems
Top J2EE performance problems that you may pay attention in locating performance and scalability issue.