Practical Clojure Profiling in Production
summary
A consolidated API endpoint initially becomes 30–180 seconds slow on cache misses; profiling with YourKit and JVisualVM identifies a hot path where transfer detection spends most time in lazy sequences. Performance gains come from separating debits and credits, sorting by amount, and reducing search space; microchanges (typing to avoid reflection, forcing evaluation) remove surprises from lazy seqs. Criterium benchmarks show about a 5–6 second improvement on the problematic cases, and New Relic with clj-newrelic provides ongoing monitoring.
AI-written summary · about
chapters (17)
- 0:00Intro
- 0:40Why is your app slow
- 2:00Example of profiling
- 2:40Measure twice code
- 4:38JVisual VM
- 5:04Function Profiling
- 5:39Filtering Profiling
- 8:13Why Profiling
- 12:44Getchas
- 14:19Type in
- 16:55Possible solutions
- 17:44Document performance
- 18:30Criterium
- 20:07New Relic
- 21:22Web UI
- 21:46clj
- 22:21flame graphs








