Skip to content

Conversation

@inetol
Copy link
Member

@inetol inetol commented Jan 8, 2026

Since we don't have many endpoints registered, the gains of using the "normal preset" are not noticeable. Instead, when using the “tiny preset", we get somewhat more consistent raw performance and shave off 7kb from the dist bundle.

Bench (document "babbaa" doesn't exist):

oha -z 10s --no-tui --disable-compression --http-version=1.1 -m HEAD http://localhost:4000/api/document/v1/babbaa

"@hono/hono" preset:

Summary:
  Total:	10001.8267 ms
  Slowest:	21.9691 ms
  Fastest:	1.2720 ms
  Average:	2.0374 ms
  Requests/sec:	24524.4201

Response time histogram:
   1.272 ms [1]      |
   3.342 ms [233405] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
   5.411 ms [11611]  |■
   7.481 ms [38]     |
   9.551 ms [134]    |
  11.621 ms [0]      |
  13.690 ms [0]      |
  15.760 ms [0]      |
  17.830 ms [25]     |
  19.899 ms [10]     |
  21.969 ms [15]     |

"@hono/hono/tiny" preset:

Summary:
  Total:	10002.1501 ms
  Slowest:	9.2341 ms
  Fastest:	1.0291 ms
  Average:	1.9588 ms
  Requests/sec:	25507.3155

Response time histogram:
  1.029 ms [1]      |
  1.850 ms [174855] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  2.670 ms [41987]  |■■■■■■■
  3.491 ms [29361]  |■■■■■
  4.311 ms [8299]   |■
  5.132 ms [470]    |
  5.952 ms [9]      |
  6.773 ms [46]     |
  7.593 ms [1]      |
  8.414 ms [10]     |
  9.234 ms [40]     |

Using ratelimited 100/rpq makes no difference:

oha -q 100 --no-tui --disable-compression --http-version=1.1 -m HEAD http://localhost:4000/api/document/v1/babbaa

See: https://hono.dev/docs/concepts/routers
See: https://hono.dev/docs/api/presets

inetol added 2 commits January 8, 2026 13:12
Since we don't have many endpoints registered, the gains of using the "normal preset" are not noticeable. Instead, when using the “tiny preset", we get somewhat more consistent raw performance and shave off 7kb from the dist bundle.

Bench (document "babbaa" doesn't exist):
```
oha -z 10s --no-tui --disable-compression --http-version=1.1 -m HEAD http://localhost:4000/api/document/v1/babbaa
```

"@hono/hono" preset:
```
Summary:
  Total:	10001.8267 ms
  Slowest:	21.9691 ms
  Fastest:	1.2720 ms
  Average:	2.0374 ms
  Requests/sec:	24524.4201

Response time histogram:
   1.272 ms [1]      |
   3.342 ms [233405] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
   5.411 ms [11611]  |■
   7.481 ms [38]     |
   9.551 ms [134]    |
  11.621 ms [0]      |
  13.690 ms [0]      |
  15.760 ms [0]      |
  17.830 ms [25]     |
  19.899 ms [10]     |
  21.969 ms [15]     |
```

"@hono/hono/tiny" preset:
```
Summary:
  Total:	10002.1501 ms
  Slowest:	9.2341 ms
  Fastest:	1.0291 ms
  Average:	1.9588 ms
  Requests/sec:	25507.3155

Response time histogram:
  1.029 ms [1]      |
  1.850 ms [174855] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  2.670 ms [41987]  |■■■■■■■
  3.491 ms [29361]  |■■■■■
  4.311 ms [8299]   |■
  5.132 ms [470]    |
  5.952 ms [9]      |
  6.773 ms [46]     |
  7.593 ms [1]      |
  8.414 ms [10]     |
  9.234 ms [40]     |
```

Using ratelimited 100/rpq makes no difference:
```
oha -q 100 --no-tui --disable-compression --http-version=1.1 -m HEAD http://localhost:4000/api/document/v1/babbaa
```

See: https://hono.dev/docs/concepts/routers
See: https://hono.dev/docs/api/presets
@inetol inetol enabled auto-merge January 8, 2026 14:08
@inetol inetol added this pull request to the merge queue Jan 8, 2026
Merged via the queue into dev with commit 9cbb326 Jan 8, 2026
1 check passed
@inetol inetol deleted the purple-border branch January 8, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants