An unofficial, read-only Hacker News reader. Join the beta →

Worshipping at the altar of Brendan Gregg (opens external site)

241 points by kqr 4 days ago | fzakaria.com | 47 comments on HN

View full thread · View on Hacker News

Comment thread (2)

  1. Yea, I love being able to go from the new guy at a new job straight to the performance wizard in the first week, or even on the first day. It’s so fun to stare into the depths of a flamechart and then point out where the problems are.

    At one job they had built this whole nifty SQL library and used it everywhere. In the first profile I took I saw that repeatedly preparing a query took more time than running it and using the data. Each call to prepare took the same amount of time as the others, so it was obvious at a glance that they weren’t caching and reusing the results. The documentation said that they did, and their tests all worked, so they had used it for years even though it was fundamentally broken. That was a fun week.

    Replies (1)
    1. Any loop is the prime suspect for optimization. I’ve seen a lot of naive implementation of something instead of using standard algorithms.