2 ms·
Profile it. If the profiler points to some awful thousand-line method and the cause isn't obvious, add logging statements to record elapsed time at several poi
by cimmanom 8y ago
Profile it.
If the profiler points to some awful thousand-line method and the cause isn't obvious, add logging statements to record elapsed time at several points within the method; use that to narrow down the cause.
Common culprits: nested loops (sometimes hidden by looping over function calls that contain loops of their own); database abuse; calls out to third-party services.
- rajacombinator 8y agoThis except I just manually log timer statements because I haven’t found a profiler I like so far.