~/talk

Profiling Code

Talkat GoWayFest 2.0 2018 · on Friday, 2018-09-28· [developer-experience]
slides:none on file

Built a small RSS search service, runs live and is profiled under 10,000 requests with GODEBUG=gc=1 and the hey load generator. Adds net/http/pprof and uses go tool pprof to fetch an alloc heap (allocs) profile, finds ~5 GB of cumulative transient allocations from strings.ToLower inside a tight loop. Moving ToLower to cache-time cuts GC runs from ~3,700 to ~1,400 and roughly doubles throughput from ~1,660 RPS, showing the concrete savings and a working fix.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:54Live demo project introduction
  3. 3:20Garbage collection tracing
  4. 7:12Running load tests
  5. 11:05Profiling with pprof
  6. 16:01Analyzing heap profiles
  7. 20:00Finding low-hanging fruit
  8. 23:13Fixing allocations
  9. 24:00Performance improvements
  10. 25:23CPU profiling
  11. 27:48Algorithm optimizations
  12. 28:51GUI for profiling
  13. 30:18Advanced debugging
  14. 32:08Tomorrow's workshop preview
  15. 32:54Q&A and closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.