Skip to content

Add Hono client-side benchmarks#1723

Merged
krausest merged 2 commits intokrausest:masterfrom
aminya:hono
Sep 6, 2024
Merged

Add Hono client-side benchmarks#1723
krausest merged 2 commits intokrausest:masterfrom
aminya:hono

Conversation

@aminya
Copy link
Copy Markdown
Contributor

@aminya aminya commented Aug 6, 2024

This adds Hono client-side benchmarks. The code was adapted from the React-hooks implementation

@aminya aminya force-pushed the hono branch 2 times, most recently from 0005f6c to eec6d18 Compare August 6, 2024 21:10
This adds Hono client-side benchmarks. The code was adapted from the React-hooks implementation
@aminya
Copy link
Copy Markdown
Contributor Author

aminya commented Aug 6, 2024

The initial results comparing Hono to Solid. Hono is much slower than Solidjs (up to 100 times slower in some actions).

Note that I didn't sit through the 10K row creation for Hono as it was too slow. I waited 20 minutes, but the benchmarks didn't finish.

image

@ryansolid
Copy link
Copy Markdown
Contributor

As far as I can tell findInsertBefore is called an enormous amount of time recursively and this makes everything slower and causes a stack overflow in the 10k row case. Scheduling everything through individual requestAnimation frames is also costly on performance.

@aminya
Copy link
Copy Markdown
Contributor Author

aminya commented Aug 9, 2024

The profiler confirms the inefficient implementation of client components in Hono.

image

@ryansolid
Copy link
Copy Markdown
Contributor

You're probably best served to open an issue on their repo and link this. I don't think it is worth adding to the benchmark until they fix this.

@aminya
Copy link
Copy Markdown
Contributor Author

aminya commented Aug 12, 2024

I will open an issue for Hono, but, I think it is crucial to have a reference benchmark for the users when they are making a choice about a certain technology. Hono's performance issues were probably unknown until I added this benchmark.

@TKDev7
Copy link
Copy Markdown

TKDev7 commented Sep 2, 2024

Looks like they fixed it?

@aminya
Copy link
Copy Markdown
Contributor Author

aminya commented Sep 3, 2024

Updated to the latest version of Hono, which fixes some of the performance issues.

@krausest krausest merged commit f308be6 into krausest:master Sep 6, 2024
@krausest
Copy link
Copy Markdown
Owner

krausest commented Sep 6, 2024

Thank. Hope to post results soon!

@krausest
Copy link
Copy Markdown
Owner

krausest commented Sep 6, 2024

Here are the results (left updated or added implementations, on the right last results if available):
Screenshot 2024-09-06 at 16 49 11
Way better than expected!

As one can see from vanillajs the run wasn't very good (though on AC, indexing off, but without rebooting) so I'd expect faster results for the next full run.

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.

4 participants