Java Performance Tuning
Java(TM) - see bottom of page
Our valued sponsors who help make this site possible
JProfiler: Get rid of your performance problems and memory leaks!
Training online: Concurrency, Threading, GC, Advanced Java and more ...
Tips December 2007
JProfiler
|
Get rid of your performance problems and memory leaks!
|
JProfiler
|
Get rid of your performance problems and memory leaks!
|
|
|
Back to newsletter 085 contents
http://kirk.blog-city.com/antipattern_nostress_testing.htm
Performance Anti-Pattern: No-stress Testing (Page last updated November 2007, Added 2007-12-27, Author Kirk Pepperdine, Publisher kirk). Tips:
- Testing without the load that would be seen in a production environment is unlikely to reveal anything useful.
- A useful performance test places the expected amount of work on the system at a rate that closely mimics that which it will be subject to in a production environment.
- Some types of performance problems can only be seen in the integrated product, but other types will show up earlier in a continuous performance testing program.
- Without a repeatable test it will be difficult to know if any fix actually worked.
http://euedge.com/blog/2007/11/11/prepared-statement-performance-in-mysql/
Prepared Statement Performance In mysql (Page last updated November 2007, Added 2007-12-27, Author Viktor Szathmary, Publisher Eu Edge). Tips:
- Prepared statements perform significantly better with a combination of useServerPrepStmts=true and cachePrepStmts=true.
http://www.theserverside.com/tt/knowledgecenter/knowledgecenter.tss?l=JavaGarbageCollection
Interview with Holly Cummins on Java Garbage Collection and Improving Application Performance (Page last updated November 2007, Added 2007-12-27, Author Kirk Pepperdine, Publisher TheServerSide). Tips:
- EVTK is a tool under development that's a verbose GC analysis tool, and it will do the visualization of the verbose GC, it will also do analysis, and it will give you recommendations.
- As of 1.5 IBM JVM has 3 GC policies: standard mark-sweep concurrent; standard mark, sweep not-concurrent; and generational.
- The optimal size of the young generation nursery is very dependent on the application usage, on how rapidly it allocates objects, how long they survive, and the patterns of object connections as well.
- WebSphere RealTime is a separate JVM that can give guaranteed short GC pauses, and guaranteed utilization too.
- There is a performance hit if using the real time JVM. It's for applications where predictability is more important than absolute performance.
http://developer.yahoo.com/performance/rules.html
Best Practices for Speeding Up Your Web Site (Page last updated September 2007, Added 2007-12-27, Author Steve Souders, Publisher Yahoo). Tips:
- the key to faster web sites is to focus on improving front-end performance.
- a typical webpage spends only 20% of its time downloading the html, the other 80% is downloading cs, images, etc.
- Make Fewer HTTP Requests - reduce the number of components the page needs to have downloaded. Suggestions include: Image maps; CSS Sprites; Inline images using the data: URL scheme; combine files, e.g. all scripts into one file, etc.
- Use a Content Delivery Network - a collection of web servers distributed across multiple locations to deliver content more efficiently to users. The server selected for delivering content to a specific user is typically based on a measure of network proximity. For example, the server with the fewest network hops or the server with the quickest response time is chosen.
- Add an Expires Header that keeps the item in the browser's cache for as long as it is feasible
- Gzip Components using Content-Encoding: gzip
- Put Stylesheets at the Top - moving stylesheets to the document HEAD makes pages load faster. This is because putting stylesheets in the HEAD allows the page to render progressively (progressive rendering is blocked until all stylesheets have been downloaded).
- Put Scripts at the Bottom - progressive rendering is blocked for all content below the script, and new parallel downloads are also blocked.
- Avoid CSS Expressions - they are evaluated more frequently than most people expect, practically every activity, even mouse moves.
- Make JavaScript and CSS External, Using external files in the real world generally produces faster pages because the JavaScript and CSS files are cached by the browser.
- Reduce DNS Lookups - Reducing the number of unique hostnames has the potential to reduce the amount of parallel downloading that takes place in the page. Avoiding DNS lookups cuts response times, but reducing parallel downloads may increase response times. The recommendation here is to split these components across at least two but no more than four hostnames.
- Minify JavaScript - Minification is the practice of removing unnecessary characters from code to reduce its size thereby improving load times.
- Avoid Redirects - Redirects slow down the user experience. Inserting a redirect between the user and the HTML document delays everything until the redirected HTML document has arrived. One of the most wasteful redirects happens frequently and web developers are generally not aware of it. It occurs when a trailing slash (/) is missing from a URL that should otherwise have one.
- Remove Duplicate Scripts
- Configure ETags or remove them.
- Make Ajax Cacheable - The browser must be informed when to use a previously cached response versus requesting a new one. This could be done by adding a timestamp to the Ajax URL indicating the last time the user modified the data, for example, &t=1190241612. If the data hasn't been modified since the last download, the timestamp will be the same and the data will be read from the browser's cache eliminating an extra HTTP roundtrip.
Jack Shirazi
Back to newsletter 085 contents
Last Updated: 2024-08-26
Copyright © 2000-2024 Fasterj.com. All Rights Reserved.
All trademarks and registered trademarks appearing on JavaPerformanceTuning.com are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. JavaPerformanceTuning.com is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
URL: http://www.JavaPerformanceTuning.com/news/newtips085.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us