summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar bigfoot547 <[email protected]>2025-01-20 18:22:35 -0600
committerLibravatar bigfoot547 <[email protected]>2025-01-20 18:22:35 -0600
commit8c3706df11abadafec89ef0546d20c79d31ec92b (patch)
tree6370b36d566b54969f7d6de9fc5a0779615b7617
parentit runs the game (diff)
increase number of concurrent tasks
-rw-r--r--src/launcher.rs2
-rw-r--r--src/launcher/assets.rs4
-rw-r--r--src/launcher/download.rs4
-rw-r--r--src/launcher/runner.rs2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/launcher.rs b/src/launcher.rs
index f148653..78c429d 100644
--- a/src/launcher.rs
+++ b/src/launcher.rs
@@ -723,7 +723,7 @@ impl LibraryRepository {
Ok(false)
}))
- .try_buffer_unordered(8)
+ .try_buffer_unordered(32)
.try_fold(0usize, |accum, res| async move {
match res {
true => Ok(accum + 1),
diff --git a/src/launcher/assets.rs b/src/launcher/assets.rs
index 271f79e..cd75d0d 100644
--- a/src/launcher/assets.rs
+++ b/src/launcher/assets.rs
@@ -229,7 +229,7 @@ impl AssetRepository {
if self.online {
info!("Downloading {} asset objects...", downloads.len());
let client = Client::new();
- MultiDownloader::with_concurrent(downloads.iter_mut(), 16).perform(&client).await
+ MultiDownloader::with_concurrent(downloads.iter_mut(), 32).perform(&client).await
.inspect_err(|e| warn!("asset download failed: {e}"))
.try_fold((), |_, _| async {Ok(())})
.await
@@ -288,7 +288,7 @@ impl AssetRepository {
}
}
})
- .try_for_each_concurrent(16, |(object, obj_path)| async move {
+ .try_for_each_concurrent(32, |(object, obj_path)| async move {
if let Some(parent) = obj_path.parent() {
fs::create_dir_all(parent).await
.inspect_err(|e| debug!("Error creating directory for asset object {}: {e}", object.name))
diff --git a/src/launcher/download.rs b/src/launcher/download.rs
index f5469d8..4eedba5 100644
--- a/src/launcher/download.rs
+++ b/src/launcher/download.rs
@@ -87,7 +87,7 @@ impl<'j, T: Download> PhaseDownloadError<'j, T> {
impl<'j, T: Download + 'j, I: Iterator<Item = &'j mut T>> MultiDownloader<'j, T, I> {
pub fn new(jobs: I) -> MultiDownloader<'j, T, I> {
- Self::with_concurrent(jobs, 8)
+ Self::with_concurrent(jobs, 24)
}
pub fn with_concurrent(jobs: I, n: usize) -> MultiDownloader<'j, T, I> {
@@ -282,7 +282,7 @@ pub async fn verify_files(files: impl Iterator<Item = &mut VerifiedDownload>) ->
debug!("Verifying library {}", dl.get_path().display());
util::verify_file(dl.get_path(), dl.get_expect_size(), dl.get_expect_sha1()).await
}))
- .try_buffer_unordered(8)
+ .try_buffer_unordered(32)
.try_fold((), |_, _| async {Ok(())})
.await
}
diff --git a/src/launcher/runner.rs b/src/launcher/runner.rs
index 8c7af3d..0f65b49 100644
--- a/src/launcher/runner.rs
+++ b/src/launcher/runner.rs
@@ -111,7 +111,7 @@ pub fn build_arguments<'l, F: FeatureMatcher>(launch: &LaunchInfo<'l, F>, versio
}
pub fn run_the_game(launch: &Launch) -> Result<(), Box<dyn std::error::Error>> {
- Command::new("/usr/lib/jvm/java-8-openjdk-amd64/bin/java")
+ Command::new("java")
.args(launch.jvm_args.iter()
.map(|o| o.as_os_str())
.chain(iter::once(OsStr::new(launch.main_class.as_str())))