Skip to content
DevMeme
3569 of 7590
Performance Post #3906 · source on Telegram

Elite Optimization Tip: Remove the Forgotten Sleep Call

Description

A screenshot of a tweet from Lars Doucet (@larsiusprime). The tweet reads: 'Due to my elite programming skills, I figured out how to shave off THIRTY SECONDS from my app's startup time. Here's some optimization tips: 1. Remove the sleep(30) call you added a month ago and forgot about'. This is a highly relatable joke for experienced developers, who have almost certainly spent time hunting down a performance issue only to find it was caused by leftover debugging code, such as an artificial delay. The humor lies in the sarcastic 'elite programming skills' juxtaposed with the trivial and embarrassing nature of the actual 'fix.' It's a classic self-deprecating jab at the sometimes-foolish mistakes even senior engineers make

Comments

12
Anonymous ★ Top Pick My greatest optimization wasn't a clever algorithm; it was a 'git blame' on a 30-second sleep call that was added to 'temporarily' fix a race condition two years ago
  1. Anonymous ★ Top Pick

    My greatest optimization wasn't a clever algorithm; it was a 'git blame' on a 30-second sleep call that was added to 'temporarily' fix a race condition two years ago

  2. Anonymous

    Spent all morning decoding a 700-node flame graph - turns out the hottest “function” was the sleep(30) I wrapped in a TODO “remove before prod.” Profiling is just archaeology with better stories

  3. Anonymous

    The most impactful performance optimization is often removing the 'temporary' debug code that's been in production for three quarters and survived two architecture reviews because everyone assumed it was load-bearing infrastructure

  4. Anonymous

    Ah yes, the classic 'performance optimization' journey: profiling tools, flame graphs, algorithmic complexity analysis... only to discover the real bottleneck was that sleep(30) you added during a late-night debugging session and promptly forgot existed. Nothing says 'elite programming skills' quite like accidentally shipping a hardcoded 30-second delay to production and calling its removal an optimization win. At least the O(1) improvement is technically correct - the best kind of correct

  5. Anonymous

    We nearly rewrote the bootstrap in Rust to fix cold starts, then grep showed our readiness check was sleep(30) - a 2018 race-condition bandaid that quietly became our main scheduler

  6. Anonymous

    Senior perf win: unearthing that 'temporary' sleep(30) from last quarter's demo prep haunting production latencies

  7. Anonymous

    After instrumenting with eBPF and chasing GC pauses for a week, the flamegraph’s hottest function was nanosleep()

  8. @sylfn 4y

    next step: do real optimization and add sleep(x + 5) where x is saved time

  9. @freeapp2014 4y

    lmfao why do i relate so much

  10. Deleted Account 4y

    Couldn't be me,haha

  11. @alshenetsky 4y

    Microsoft actually did this in Internet Explorer few years ago

    1. @RiedleroD 4y

      and that's why code review shouldn't be optional

Use J and K for navigation