Use rb_io_wait function and cache io instance.#47
Use rb_io_wait function and cache io instance.#47ioquatix wants to merge 5 commits intotrilogy-libraries:mainfrom
rb_io_wait function and cache io instance.#47Conversation
|
@matthewd can you please approve and run the workflows. |
61269c1 to
dc88886
Compare
|
There is one more piece we should consider exposing, which is the "resolve DNS" to use the fiber scheduler hook. |
|
So, writing this PR has made me realise we need a set of shims for the blocking C APIs, e.g. We should also extend the test suite to run within a fiber scheduler (probably Async). |
|
@ioquatix is this good to go? It seems fine to me, not sure if you've kept it in draft for a reason, or just not hit the button? |
|
It's probably as good as we can make it.. but I want to review it this weekend. This week has been pretty busy, have not had much time for open source stuff. |
|
👋 just wanted to say that I appreciate this WIP PR by Samuel and I'd really really love to see this happen in the upstream, and to be able to use trilogy with fiber scheduler for IO-heavy workloads. |
So my knowledge of the fiber scheduler is limited, but AFAIK you can already use it today? My understanding is that this PR make it a bit more efficient, but As for it happening, there's not much work needed, all the blockers are listed in review comments. |
|
I've rebased and updated the PR.
@matthewd can you please run CI. |
cc37ef9 to
a3baae0
Compare
ab563aa to
effb070
Compare
|
I recall why I gave up on this PR for a while, we were missing |
|
I believe all the feedback has been addressed, so this is good to go. |
eregon
left a comment
There was a problem hiding this comment.
What's the performance gain with this?
Is it worth the duplication of _cb_ruby_wait and additional complexity?
It should be slightly more efficient, but I imagine there isn't much performance difference (except for GC overhead due to the temporary IO objects created).
I would say yes. |
|
I think now that |
https://github.com/github/activerecord-trilogy-adapter/issues/28