Skip to content

Introduce a priority queue:#166

Closed
Edouard-chin wants to merge 1 commit intoec-split-download-installfrom
ec-queue-with-priority
Closed

Introduce a priority queue:#166
Edouard-chin wants to merge 1 commit intoec-split-download-installfrom
ec-queue-with-priority

Conversation

@Edouard-chin
Copy link
Member

Note

This PR is stacked on top of ruby#9381

What was the end-user or developer problem that led to this PR?

In ruby#9381, I explained the issue about the "tail latency".

TL;DR When a gem with a native extensions is downloaded, the sooner we starts compiling, the sooner it gets installed. If a gem with a native extensions ends up at the end of the queue, the longer bundle install becomes.

Before (Benchmark recorded from ruby#9381)

tail-before

After

tail-after

What is your fix for the problem, implemented in this PR?

I'd like to introduce a simple queue with priority. When a gem is downloaded, we check whether that gem has a native extension and if its dependencies are installed. If both conditions are met, we add the gem in the priority queue to be picked up as quickly as possible.

Make sure the following tasks are checked

- ### Problem

  In ruby#9381, I explained the
  issue about the "tail latency".

  TL;DR When a gem with a native extensions is downloaded, the sooner
  we starts compiling, the sooner it gets installed.
  If a gem with a native extensions ends up at the end of the queue,
  the longer `bundle install` becomes.

  ### Solution

  I'd like to introduce a simple queue with priority. When a gem is
  downloaded, we check whether that gem has a native extension and
  if its dependencies are installed. If both conditions are met,
  we add the gem in the priority queue to be picked up as quickly
  as possible.
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.

1 participant