Programming

A practical guide to profiling a slow web application

Measure the user-visible delay, isolate the expensive path and resist optimizing code that is merely easy to change.

Performance work begins with a specific wait. “The application feels slow” becomes useful only when it turns into “opening a customer record takes four seconds after the click.”

Capture before changing

performance.mark("record:start");nawait loadCustomerRecord(id);nperformance.mark("record:end");nperformance.measure("record", "record:start", "record:end");

A trace often reveals that the expensive operation is not where the team expected. Measure the complete path, make one change, and measure again.

Samir Das
About the writer

Samir Das

Engineering columnist

A Chronicle contributor. Update this biography and portrait in the author profile.

Read next

The weekly briefing

Deep insights, delivered.

A considered edit of our strongest reporting, sent once a week.

Leave a Reply

Your email address will not be published. Required fields are marked *