CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT In (Web hosting services)
CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT In the end, you will have identified a collection of offending methods, and it is your responsibility to identify why they are slow. One of the most common causes of a slow method is a call to an external dependency, such as a database. Figure 10-15 reveals that there was a SQL statement in this example that took almost 1 second to complete. Figure 10-15. The highlighted SQL statement took almost 1 second to complete. As shown in Figure 10-15, the highlighted SQL statement spent on average 0.990 seconds executing, but it is worth noting that its maximum response time was 8.597 seconds, meaning that when the request s response time executed slowly, the database contributed significantly to the overall response time. (Note that I extracted this example from a real customer application, so I excluded the customer s SQL for privacy reasons.) Performance problems inside applications tend to have one of the following causes: A slow call to an external dependency. A method (or subgraph of a request) called an excessive number of times. The method may perform adequately each time it is called, but it is called so many times that it becomes problematic. This issue is common when building large strings; internally, string concatenations resolve to StringBuffer.append() method calls. The append() method usually completes in less than one millisecond, but when it is called 10,000 times, it becomes problematic!
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.