logoalt Hacker News

huehotoday at 2:12 PM1 replyview on HN

> Sucrose looks at code and tells the "compiler" to only parse params and skip parsing other parts of the request like body, query, headers entirely as it's not need.

My understanding is that just offering a request object with lazy accessors would solve this issue, although the accessor itself would have some overhead in repeat accesses.

> Elysia has two special optimizations for response mapping functions: mapResponse and mapCompactResponse.

This section feels a bit abstract - some transformation examples would be nice.


Replies

re-thctoday at 5:25 PM

> a request object with lazy accessors would solve this issue, although the accessor itself would have some overhead in repeat accesses

The overhead can be reduced with caching. Frameworks like Java Vertx (used by Quarkus) already do it this way?