~/talk

Go Right Ahead! Simple Hacks to Cut Memory Usage by 80&

Talkat GopherCon Europe 2023 · 2023-06-26..06-29· [go]
slides:none on file

Cubescape reduces memory usage by ~80%, dropping a hot function from 33.64 GB to 0.85 GB by applying concrete fixes: reorder struct fields to avoid padding, preallocate slices to stop repeated resizes, avoid unnecessary pointers or use sync.Pool for reuse, compile regexes once, and limit concurrent goroutines with timeouts/cancellation. Memory hotspots are found and validated with pprof heap profiles and benchmarks so each change shows measurable impact before deployment.

AI-written summary · about

  1. 0:00Introduction
  2. 1:50Agenda
  3. 2:12Why is it important
  4. 3:08Challenges
  5. 3:44Tradeoffs
  6. 5:28Golang Memory Model
  7. 10:09Size declarations
  8. 12:03Pointer usage
  9. 13:35Regular Expressions
  10. 14:37Loops
  11. 16:02Go routines
~/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.