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

Pooling #189

Open
yilinwei opened this issue Aug 10, 2023 · 0 comments
Open

Pooling #189

yilinwei opened this issue Aug 10, 2023 · 0 comments
Assignees

Comments

@yilinwei
Copy link
Collaborator

yilinwei commented Aug 10, 2023

See typelevel/fs2#3157.

Generally my thoughts are that this would be beneficial for Scala native and on the JVM.

As mentioned in the linked issue, the suggestion was to use keypool.

Here are some thoughts:

  • We don't really want it to be bounded, as the only issue with creating tons of these objects is just increasing the memory. Waiting for a free member would really suck.
  • I suspect that our idle lifetime for our various resources is dependent on the runtime. On scala native, it's pretty much going to be a malloc call so it's going to be fairly cheap - on the JVM, it's going to go through class reflection which is going to be a bit more expensive. Node delegates to OpenSSL so it will be the same as native unless they do something clever under the hood.
  • I'd also like to introduce some rudimentary benchmarking to see if it actually makes a difference.
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

No branches or pull requests

1 participant