Hacker News new | ask | show | jobs
by jononor 3956 days ago
Before you start, determine what you are attempting to optimize. Throughput or latency? Improving averages, or reducing how often below-acceptable performance occurs?

Write end2end tests that execises the application as close to what user would. Then, use a profiler with an API so you can start dump when test/app setup is completed (to avoid extranous noise/misleading data). I like gperftools combined with KCachegrind as a GUI. Used it very successfully for instance in MyPaint: http://www.jonnor.com/2012/11/improved-drawing-performance-i...