← Graph

How do routing trees find the right controller at request time?

question 2 connections

An attendee unfamiliar with Roda asks how a request finds its controller in a routing tree, since the cost has been moved from boot time to request time. Stephen Margheim answers: Ruby is fast enough, you don't process everything — you just walk code paths down the tree, which converges quickly; for genuinely hot paths you use inline hash-based dispatch (essentially O(1)), and the constant sub-millisecond boot enables the tests-plus-deploy-in-a-second vision. No acceptable tradeoff would give that up.

answer_summary
Ruby is fast enough, only the touched code paths are walked, and hash-based dispatch is available for hot paths; keeping boot time near zero unlocks the under-one-second CI+deploy goal.
question How do routing trees find the right controller at request time?
about
Routing Tree concept
Question asks how cost-moved-to-request-time works in the routing-tree approach.
question How do routing trees find the right controller at request time?
asked_at
Single Q&A question taken at the end of the talk.

Provenance