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

Make Write phase async #1288

Merged
merged 2 commits into from Jan 6, 2018
Merged

Make Write phase async #1288

merged 2 commits into from Jan 6, 2018

Conversation

@ddfreyne
Copy link
Member

@ddfreyne ddfreyne commented Jan 6, 2018

This changes the Write phase to do writing in a background process, so that IO-intensive and CPU-intensive work can happen at the same time.

  • Let #raw_path block until file exists
  • Fix compilation duration for each item rep
    • Currently, it records/shows the duration between the start of the compilation and the moment where the file is written. This duration no longer makes sense because the writing happens asynchronously. The value that it currently prints gives a hint at how much the writing is running behind the compilation.

Here’s a before-and-after comparison of the GitLab CI docs (a fairly large site):

Before:

     phases │ count     min     .50     .90     .95     max      tot
────────────┼───────────────────────────────────────────────────────
      Write │  3209   0.00s   0.00s   0.01s   0.01s   0.18s   12.09s
Site compiled in 49.90s.

After:

     phases │ count     min     .50     .90     .95     max      tot
────────────┼───────────────────────────────────────────────────────
      Write │  3209   0.00s   0.00s   0.01s   0.01s   0.13s    7.17s
Site compiled in 39.90s.
@ddfreyne ddfreyne merged commit 668a639 into master Jan 6, 2018
3 checks passed
Loading
@ddfreyne ddfreyne deleted the async-write branch Jan 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant