Change:
Right now when doing a local , we first compress the artifacts with max compression ratio, just to immediately unpack them again when installing them to disk. Making the compression level less aggressive or skipping it altogether can probably save 5-10 minutes on an x.py install. <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
cc You probably want to use the gzip'd artifacts which are less intensely compressed.
tbh it seems strange that we're compressing these at all - why not put them into an uncompressed .tar archive when using ?
or even better, copy them directly from the build directory to the install directory without going through a .tar archive first.
claim
Skipping the compressions and archiving in favor of directly copying the artifacts seems like a reasonable solution for . But it requires significant changes to how we currently handle . I'm planning to do a comprehensive review on bootstrapping from all angles(including T-bootstrap issues) and make a roadmap for future development. To avoid conflicts(e.g, if we have improvement ideas on dist/install modules, implementing this might increase the technical debt which will require more effort from the team), I will postpone this task for now and re-prioritize it once we have organized the plans.

Discussion:
severity: ChangeSeverity::Warning, summary: "The "codegen"/"llvm" profile has been removed and replaced with "compiler", use it instead for the same behavior.", }, <ins> ChangeInfo { change_id: 118724, severity: ChangeSeverity::Info, summary: "`x install` now skips providing tarball sources (under 'build/dist' path) to speed up the installation process.", }, </ins> ];

process::Command, }; <del> use crate::core::build_steps::dist::distdir; </del> use crate::core::builder::Builder; <ins> use crate::core::{build_steps::dist::distdir, builder::Kind}; </ins> use crate::utils::channel; use crate::utils::helpers::t;

assert!(!formats.is_empty(), "dist.compression-formats can't be empty"); cmd.arg("--compression-formats").arg(formats.join(",")); } <del> cmd.args(["--compression-profile", &self.builder.config.dist_compression_profile]); </del> <ins> // For `x install` tarball files aren't needed, so we can speed up the process by not producing them. let compression_profile = if self.builder.kind == Kind::Install { self.builder.verbose("Forcing dist.compression-profile = 'no-op' for `x install`."); // "no-op" indicates that the rust-installer won't produce compressed tarball sources. "no-op" } else { assert!( self.builder.config.dist_compression_profile != "no-op", "dist.compression-profile = 'no-op' can only be used for `x install`" ); &self.builder.config.dist_compression_profile }; cmd.args(&["--compression-profile", compression_profile]); </ins> self.builder.run(&mut cmd); // Ensure there are no symbolic links in the tarball. In particular,

use anyhow::{Context, Error}; use flate2::{read::GzDecoder, write::GzEncoder}; use rayon::prelude::*; <del> use std::{convert::TryFrom, fmt, io::Read, io::Write, path::Path, str::FromStr}; </del> <ins> use std::{fmt, io::Read, io::Write, path::Path, str::FromStr}; </ins> use xz2::{read::XzDecoder, write::XzEncoder}; #[derive(Default, Debug, Copy, Clone)] pub enum CompressionProfile { <ins> NoOp, </ins> Fast, #[default] Balanced,

"fast" => Self::Fast, "balanced" => Self::Balanced, "best" => Self::Best, <ins> "no-op" => Self::NoOp, </ins> other => anyhow::bail!("invalid compression profile: {other}"), }) }

CompressionProfile::Fast => f.write_str("fast"), CompressionProfile::Balanced => f.write_str("balanced"), CompressionProfile::Best => f.write_str("best"), <ins> CompressionProfile::NoOp => f.write_str("no-op"), </ins> } } }

CompressionProfile::Fast => flate2::Compression::fast(), CompressionProfile::Balanced => flate2::Compression::new(6), CompressionProfile::Best => flate2::Compression::best(), <ins> CompressionProfile::NoOp => panic!( "compression profile 'no-op' should not call `CompressionFormat::encode`." ), </ins> }, )), CompressionFormat::Xz => { let encoder = match profile { <ins> CompressionProfile::NoOp => panic!( "compression profile 'no-op' should not call `CompressionFormat::encode`." ), </ins> CompressionProfile::Fast => { xz2::stream::MtStreamBuilder::new().threads(6).preset(1).encoder().unwrap() }

use anyhow::{Context, Result}; <del> use clap::{self, Parser}; </del> <ins> use clap::Parser; </ins> #[derive(Parser)] struct CommandLine {

impl Tarballer { /// Generates the actual tarballs pub fn run(self) -> Result<()> { <ins> if let CompressionProfile::NoOp = self.compression_profile { return Ok(()); } </ins> let tarball_name = self.output.clone() + ".tar"; let encoder = CombinedEncoder::new( self.compression_formats