Before improving performance, we need to find the possible causes of performance bottlenecks. There are different ways of analyzing application behavior.
Read this post on idlebrains.org