-
Notifications
You must be signed in to change notification settings - Fork 31
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
Async function call performance #25
Comments
@mwojtul nothing really jumps out to me. If by |
I know it's been forever since anyone responded, but I have a feeling this is because of our undocumented environment variable optimization: https://github.com/revelrylabs/elixir-nodejs/blob/master/priv/server.js#L6 We blow away |
I tried setting |
I looked into this some time ago with elixir_react_render and its definitely tied to the way Task works/used. https://github.com/revelrylabs/elixir-nodejs/blob/master/lib/nodejs/supervisor.ex#L52-L65 As you can see in the code above,
I think we'd need to change or add something to make it not |
I wrote a JS function that fetches some data and uses it to render a React/Vue component. I decided to do some load testing and for consistency's sake I mocked the data call with a promise that returns after 40ms.
50 virtual users sending 5 requests each:
Results with a pool size of 4:
I haven't worked much with OTP yet but it seems like each worker needs to wait for the async request to resolve. The same behavior can be observed in
test "gets resolved value"
. CallingNodeJS.call("slow-async-echo", [1234])
a second time will add another second to the test execution time.@bryanjos Any way around this? I'd be happy to take a stab at a PR or help in whatever way. Figured I'd inquire if anything jumps out to you.
The text was updated successfully, but these errors were encountered: