Skip to content
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

perf: use prepared statment cache #241

Closed
wants to merge 2 commits into from
Closed

perf: use prepared statment cache #241

wants to merge 2 commits into from

Conversation

missinglink
Copy link
Member

This PR introduces a cache for prepared statements which improves performance by ~10% at 100VUs

Typical load test results after pre-warming on my macbook:

k6 run --vus 100 --iterations 10000 test.js

master
    iteration_duration.........: avg=55.42ms min=15.67ms med=55.18ms max=90.3ms  p(90)=63.34ms p(95)=66.49ms
    iterations.................: 10000  1797.863942/s

this PR
    iteration_duration.........: avg=44.16ms min=13.45ms med=43.4ms  max=79.23ms p(90)=47.22ms p(95)=49.71ms
    iterations.................: 10000  2253.759616/s

@@ -34,7 +34,7 @@
"jsftp": "^2.0.0",
"lodash": "^4.17.4",
"morgan": "^1.9.0",
"node-postal": "^1.0.0",
"node-postal": "https://github.com/imothee/node-postal.git",
Copy link
Member Author

@missinglink missinglink Mar 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, I needed this for testing nodejs@v12, @orangejulius what should we do about this?
it's only tangentially related to the PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine to merge it. I hadn't merged it yet because I figured we'd be merging #146, but its been a while now and Node.js 12 is still not technically supported.

@missinglink missinglink force-pushed the performance branch 2 times, most recently from c63e638 to 93f2ef6 Compare March 12, 2020 10:49
@missinglink
Copy link
Member Author

superseded by #244

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