hono icon indicating copy to clipboard operation
hono copied to clipboard

Import / Export router state

Open akku1139 opened this issue 1 year ago • 1 comments

What is the feature you are proposing?

Hono's RegExpRouter is fast, but it has the disadvantage that route registration is slow.

RegExpRouter is fast, but the route registration phase can be slightly slow.

Hono Docs - https://hono.dev/docs/concepts/routers#linearrouter

This proposal is part of the RegExpRouter acceleration.

  1. Export routes and RegExp when building Hono application.
  2. The built application imports routes and built RegExp.
  3. The route registration phase is skipped when the application boots.
  4. Very fast startup with RegExpRouter is achieved.

Roadmap

  • [ ] Import / Export router state (this issue) https://github.com/akku1139/hono/tree/feat/import-export-router-state
  • [ ] @hono/vite-build support
  • [ ] HonoX support
  • [ ] Document

akku1139 avatar Oct 27 '24 14:10 akku1139

Hi, @akku1139, thanks for creating the issue. Just so you know, a pull request tried the same thing, so please refer to the discussion there as well. https://github.com/honojs/hono/pull/1796

usualoma avatar Oct 27 '24 21:10 usualoma