Taku Amano
Taku Amano
However, while I think this is an exciting feature, I have not found a "strong motivation or use case that requires implementation" at this time, so I guess it is...
Hi, @yusukebe. What do you think about this?
@yusukebe Thank you for your comment. After creating the PR, I thought about it for a while. File-based routing can easily extract paths, but it is expensive to run `import`...
@yusukebe > This might not be related, but it's one idea. Can we improve performance like this with explicitly build routes? I guess you mean "finish initializing the router before...
And maybe SmartRouter. I have not confirmed that it works. ```diff diff --git a/src/router/smart-router/router.ts b/src/router/smart-router/router.ts index 7b0510d8..3a970ca8 100644 --- a/src/router/smart-router/router.ts +++ b/src/router/smart-router/router.ts @@ -20,6 +20,11 @@ export class SmartRouter implements...
@yusukebe Thank you so much! I think the following result is "smaller because TrieRouter is no longer included". > Default: dist/_worker.js 30.39 kB > Only PreparedRegExpRouter: dist/_worker.js 27.84 kB The...
@yusukebe Yeah, I know, but `buildInitParams()` depends on `RegExpRouter()`, so when we import `buildInitParams()`, it bundles the following source code. src/router/reg-exp-router/{trie,node}.ts https://github.com/honojs/hono/pull/1796/files#diff-05f98af8ac89c7dd686b79c41d8167478c790c0051245d79c3b0f0554351dc63R77 And `buildInitParams()` is as heavy as the normal...
Ah, but I don't deny the following opinion. > it might be too much optimization This code is very high-performing, but it might be too complicated. We might be happier...
Hi @niklasgrewe ! Thanks for the suggestion. The ability to precompile the following features would be essential to implement and execute them in high performance. When dynamically parsing and executing...
Hi @Code-Hex Can you adopt the work-around of writing the following? ```tsx return await html`${{children}}` ``` or ```tsx import { jsx } from 'hono/jsx' ... return await html`${jsx(Layout2, {}, children)}`...