~/talk

Hanami::API

Talkat RubyConfBY 2020 Online · 2020-07-18..07-19· [ruby-on-rails]
slides:none on file

Hanami::API packages a new high‑performance Ruby router into a tiny Rack framework, measuring against Roda and Sinatra with concrete numbers: initial runtime 1.11s (Roda 0.34s) and memory ~50–53MB versus Sinatra 125MB, then optimized to 0.081s and reduced boot memory from 116MB to 73MB. Speedups come from changing array→trie storage, method+path partitioning (separate fixed vs variable buckets), targeted microbenchmarks and removing shared deps, and the built app achieves the claimed lower latency and smaller footprint.

AI-written summary · about

  1. 0:00Intro
  2. 1:01hanami- router in a DSL
  3. 2:58Low risk Hanami adoption
  4. 7:23JSON rendering, scopes, mounted apps, Rack
  5. 10:44Competition is healthy for Ruby ecosystem
  6. 14:24O(log n) logarithmic
  7. 15:03Trie based router
  8. 16:08The previous version used to store routes in a collection. O(n)
  9. 16:23Each partition has its own trie.
  10. 17:43Fixed vs variable paths
  11. 18:06Partitioned tries are only used for variable paths (e.g. /books/:id)
  12. 19:52Fixed paths are stored separately in a partitioned Hash.
  13. 22:19Micro speed enhancements
  14. 22:55Instance variables are faster than getters.
  15. 23:05Avoid each_with_object
  16. 26:13The present of Ruby is bright, the future is exciting.
~/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.