Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

decrease build times for pack command #330

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Commits on Mar 15, 2021

  1. feat: decrease build times for pack command

    - We can reuse the tarball and append new files (node binaries in this
    case) instead of compressing/extracting multiple times. This prevents
    un-necessary copying of files in the built tarball.
    
    We can also build all `targets` in parallel in the following way:
    - Download Node.js versions for targets in parallel instead of serially
    - Use [workerpool][1] to create gzip files in parallel
    - Run all `xz` compression with maximum available threads. xz has
    [supported multicore computation since 5.2 (2014)][1].
    - Like gzip, run all `xz` compression in parallel instead of waiting for
    each target to build.
    
    Running this in the Heroku CLI produced identical tarballs in 65% amount
    of time (~111s seconds vs ~344 seconds before this change). It's likely
    even a bit faster since I was running it locally which has some boot-up
    time due to ts-node compiling typescript at runtime.
    
    [1]: https://www.npmjs.com/package/workerpool
    [2]: https://www.phoronix.com/scan.php?page=news_item&px=MTg3MDM
    fivetanley committed Mar 15, 2021
    Configuration menu
    Copy the full SHA
    a1e505f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bec78fc View commit details
    Browse the repository at this point in the history
  3. restore manifest

    fivetanley committed Mar 15, 2021
    Configuration menu
    Copy the full SHA
    3a85824 View commit details
    Browse the repository at this point in the history
  4. fix eslint error

    fivetanley committed Mar 15, 2021
    Configuration menu
    Copy the full SHA
    4ba4b21 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2021

  1. try this maybe

    fivetanley committed Mar 16, 2021
    Configuration menu
    Copy the full SHA
    4221d53 View commit details
    Browse the repository at this point in the history
  2. try more

    fivetanley committed Mar 16, 2021
    Configuration menu
    Copy the full SHA
    18d334c View commit details
    Browse the repository at this point in the history
  3. bail

    fivetanley committed Mar 16, 2021
    Configuration menu
    Copy the full SHA
    dabfd41 View commit details
    Browse the repository at this point in the history
  4. more explicit mv

    fivetanley committed Mar 16, 2021
    Configuration menu
    Copy the full SHA
    126b714 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fc8a649 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    04fb738 View commit details
    Browse the repository at this point in the history