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 single thread runime in tokio_util::block_on #3080

Merged
merged 1 commit into from
Oct 7, 2019

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Oct 6, 2019

Replaces creating threadpool runtime in tokio_util::block:on with creating a single-threaded runtime in newly spawned thread.

This PR lowers thread count in benchmarks
this PR

"thread_count": {
    "error_001": 4, 
    "cold_relative_import": 5, 
    "cold_hello": 4, 
    "workers_round_robin": 3, 
    "relative_import": 3, 
    "workers_startup": 3, 
    "hello": 3
  }

master

"thread_count": {
    "error_001": 5, 
    "cold_relative_import": 7, 
    "cold_hello": 5, 
    "workers_round_robin": 3, 
    "relative_import": 3, 
    "workers_startup": 3, 
    "hello": 3
  }, 

It's still not perfect, but minimizes the impact. This is only used in two situations:

  • caching output of TS compiler
  • applying source map

@bartlomieju bartlomieju changed the title [TEST] use single thread runime in tokio_util::block_on perf: use single thread runime in tokio_util::block_on Oct 6, 2019
@ry
Copy link
Member

ry commented Oct 7, 2019

SGTM - are you ok with me landing this?

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM

@ry ry merged commit 41ed4cd into denoland:master Oct 7, 2019
@bartlomieju bartlomieju deleted the test-tokio_util_current_thread branch October 7, 2019 08:33
@ry
Copy link
Member

ry commented Oct 8, 2019

Nice progress over the last week in thread count thanks to the big drop done in #3043 by @kitsonk and the second drop by @bartlomieju in this PR:

Screen Shot 2019-10-07 at 10 30 30 PM

bartlomieju added a commit to bartlomieju/deno that referenced this pull request Oct 10, 2019
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