How should I start profiling/optimizing my java application/oracle database?
Yesterday I read something abouth application optimization and how a programmer should find the most used parts of the program and by profiling and modifying them getting the most benefit (when looking at the time/work invested vs. memory/speed gains). Now, I've run the Eclipse profiler, got VisualVM but I don't how to use this data properly. My primary concerns are memory usage (i'm generating an XML and either storing it to disk as a zip or flushing it as zip to the user for download) and slowdowns from the database (i'm suspecting my indexes aren't there or aren't good, and in any case, don't know much about them so I can't tell you more :) but I don't even know how to start this. For the first case VisalVM shows that the program uses up to 200MB, but when I inspect the Heap Dump and click the most used object (or how it's called), the information is overwhelming. For the second case I know even less, other than that Toad has some tools.
What I want to know is how to start doing this, and when I'm satisfied with the local performance, how to do it on the production application.
Edit1: So, for a concrete example of memory usage (i'm generating an XML 开发者_JS百科and either storing it to disk as a zip or flushing it as zip to the user for download). This is what I get when I choose "Heap dump", then choose top 20 objects by retained size and open the details:
and this is what I get when I opened Profiler on the same use case:
The question is, what do this screens tell me? :)
As far a database applications go, I would start from reading Cary Millsap's excellent articles:
http://method-r.com/downloads/cat_view/38-papers-and-articles
Search for "Making friends with the Oracle Database" for example...
精彩评论