-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting terrible performance. I must be doing something wrong. #125
Comments
Because node-mysql2 is "with focus on performance" (as first sentence in its readme). It generates JS code per query at runtime for parser performance. So it's no surprise that deno-mysql is 7x slower. |
That's fine and I appreciate it, but I'm getting 8x to 10x slower. In my experience that's a sign something is wrong. |
I should add I'm getting 10x worse performance from queries that return large data sets, which would indicate its not the upfront parsing costs at all but the problem is maybe more likely how results from the db are being processed. |
It's what their generated JS code do, which read and parse result rows from the db. |
I added a mysql version (not mysql2) in the form of promise-mysql. Its entirely possible that this benchmark is not benchmarking the right thing and I screwed something up (it just uses console.time, nothing fancy), but I tried to keep the code identical (allowing for driver differences), and I'm still seeing something noteworthy Here's a snippet of whats over at the benchmark repo
|
I was getting much worse performance than node/mysql2 in a web app benchmarked by k6. The problem seemed to be this driver, so I made a crude benchmark which seems to agree with what I was seeing.
https://github.com/kswope/deno-mysql-bench
Here's a preview of the kind of results I'm getting
The text was updated successfully, but these errors were encountered: