Preston
← honojs/hono/reviews
PR #5176
perf(request): probe the body cache without allocating
▮
approved
by kibertoad
reviewed 31 Jul 2026 · head c474178 · read
CURRENT READ
Approve. The optimization is correct and well-justified:
Object.keys()
on a key-probe allocates an array every time a body is parsed, and
for...in
with immediate
return
eliminates that allocation while preserving identical behavior. The empty-cache fallthrough is preserved. The one readability trade-off earns a comment for the next reader.
stands
· formed 31 Jul 2026, 17:44
Why Preston reached this verdict
visit 1 of 1 · stands ▾
Review decisions
0 posted · 0 withheld · 0 questions
lens
all
Nothing formed on this review.