-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Peg isolates to a thread, replace all usage of tokio threaded runtime with tokio's basic runtime #3844
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, this patch is massive and requires a few more follow ups
So the Isolate is still a future if I'm reading this correctly. |
|
Probably. The event loop is basically defined the same as it was in
In this patch all blocking ops are done on their own thread. I leave it to future work to optimize this. |
Although the code looks fine from my perspective, I worry that it's going to hurt some benchmark performance badly. Do you have any numbers for e.g. module fetch / proxy performance? |
pub struct Worker { | ||
pub name: String, | ||
pub isolate: Arc<AsyncMutex<Box<deno_core::EsIsolate>>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that we've gotten rid of this Arc Mutex
I don't think we measure any blocking ops in the benchmarks. Regarding compiling - we spawn a new thread for the TS compiler worker - so that's an async op. |
I'm a bit afraid this is is never going to happen. |
Are we going to use |
@hustxiaoc Unlikely - we have in the past and have found the single threaded runtime faster and simpler for our purposes. I'd be happy to describe this in more detail if you're interested... |
Sure, I'm happy to learn more detail about this :) |
No description provided.