<ul>
<li>Any personal experience in overcoming web application performance hurdles? </li>
<li>Any recommended strategies for improving the performance of a data-driven web application? </li>
</ul>

<p>My development team works on a web application (JSP reports, HTML, JavaScript) that uses an Oracle database (PL/SQL). The key functionality the application delivers is in reporting, where a user can get PDFs of reports at a high level and drill down to lower levels of supporting details. </p>

<p>As the number of supporting detail records has grown into the millions, the performance of the system has significantly degraded. Based on our current analysis of the metrics, the bottleneck seems to be in the logic hitting the DB and the DB performance. Changing the DB model and re-doing some of the server side logic is currently being explored.  </p>

<p>Partioning, indexing, explain plans, and running statistics are things that have been done on the DB side to try to help improve performance. While they've helped, they haven't solved the issue satisfactorily. The toughest part in analyzing performance data is that the database and web servers are remotely administered by a different part of the IT organization, so the developers don't have regular, full access to see what's going on (especially in the production environment, which is not mirrored exactly in any other development/testing environment).  </p>

[{'answer_id': 22722, 'author': 'Webjedi', 'author_id': 1975, 'author_profile': 'https://Stackoverflow.com/users/1975', 'pm_score': 4, 'selected': True, 'text': "<p>While my answer may not contain any concrete steps to help this is always where I start.</p>\n\n<p>First thing I would do is try to throw away all of your assumptions about what the trouble is and take steps to install metrics everywhere you can.  Let the metrics guide you rather than your intuition.  I've chased many, many, many white rabbits going on a hunch...the let me down more times than they've been right.</p>\n"}, {'answer_id': 22737, 'author': 'Barrett Conrad', 'author_id': 1227, 'author_profile': 'https://Stackoverflow.com/users/1227', 'pm_score': 2, 'selected': False, 'text': '<p>Have you considered building your data ahead of time?  In other words are there groups of data that are requested again and again?  If so have them ready before the user asks.  I\'m not exactly talking about caching, but I think that is part of the equation.  </p>\n\n<p>It might be worth it to take a step back from the code and examine the usage patterns of the system.  For example, if you are showing people monthly inventory or sales information do they look at it at only at the end of the month?  If so just build the data on the last day and store it.  If they look at it daily, maybe try building each previous days results and storing the results and avoid the calculation.  I guess ultimately I am pushing you in to a <a href="http://en.wikipedia.org/wiki/Dynamic_programming" rel="nofollow noreferrer">Dynamic Programming</a> solution; if you know an answer don\'t solve it again. </p>\n'}, {'answer_id': 22739, 'author': 'James Marshall', 'author_id': 1025, 'author_profile': 'https://Stackoverflow.com/users/1025', 'pm_score': 1, 'selected': False, 'text': '<p>As Webjedi says, metrics are your friend.</p>\n\n<p>Also look at your stack and see where there are opportunities for caching - then employ mercilessly wherever possible!</p>\n'}, {'answer_id': 22741, 'author': 'Marcus Downing', 'author_id': 1000, 'author_profile': 'https://Stackoverflow.com/users/1000', 'pm_score': 1, 'selected': False, 'text': '<p>As I said in <a href="https://stackoverflow.com/questions/12927/if-you-have-a-java-application-that-is-consuming-cpu-when-it-isnt-doing-anythin#19767">another question</a>:</p>\n<blockquote>\n<p><strong>Use a profiler.</strong> Yes they cost money, and using them can occasionally be a bit awkward, but they do provide you with a great deal more real evidence rather than guesswork.</p>\n<p>Human beings are universally bad at guessing where performance bottlenecks are. It just seems to be something our brains aren\'t build to do very well. It may seem obvious, you may have great ideas about what the problem is, but the real world often turns out to be doing something different. And optimising the wrong part of code means, at best, lots of work for minimal benefit. More often it makes things slower, and sometimes it breaks things entirely. So before you make any changes for the sake of optimisation, you should always have real evidence from a profiler or other accurate tool.</p>\n</blockquote>\n'}, {'answer_id': 22784, 'author': 'Kibbee', 'author_id': 1862, 'author_profile': 'https://Stackoverflow.com/users/1862', 'pm_score': 1, 'selected': False, 'text': "<p>Not all profilers cost (extra) money.  For .Net, I'm successfully using an old build of NProf (currently abandoned but it still works for me) for profiling my ASP.Net applications.  For SQL Server, the query profiler is part of the package.  There's also the CLF Profiler from MS but I've never been able to get it to work successfully.</p>\n\n<p>That being said, profilers are definitely the way to go.  That way you can see where your program is spending most of its time, and not focus on things that you think are slow.  Plus it means you don't have to write anything in your code to actually record the metrics.  </p>\n\n<p>As I hinted to at the beginning, there are different types of profilers.  The three I find most useful are application profilers, which let you see which functions you actually spend most of your time in.  The second is SQL profilers that let you see how long your queries take to run.  The third is memory profilers, which help to show you what type of objects your memory is being used up by.  All three of these are really useful, and although you won't use them every day, the times you do use them will save you a lot of headache.</p>\n"}, {'answer_id': 22821, 'author': 'Polsonby', 'author_id': 137, 'author_profile': 'https://Stackoverflow.com/users/137', 'pm_score': 2, 'selected': False, 'text': '<p>Have you checked this out?</p>\n\n<p><a href="http://developer.yahoo.com/performance/" rel="nofollow noreferrer">Best practices for making web pages fast</a> from Yahoo!\'s Exceptional Performance team</p>\n\n<p>If you really are having trouble at the backend, this won\'t help. But we used their advice to great effect to make our site faster, and there is still more to do.</p>\n\n<p>Also use the YSlow add-on for Firebug. You may be surprised when you see where the actual time is being taken up.</p>\n'}]
['https://Stackoverflow.com/questions/22704', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']