v0.19.0 — Bump default parallel segments 8→16 to shorten end-of-DL tail

Issue : on a 14 GB download with 8 segments, when 7 finish there's only
1 connection left handling its assigned 1.75 GB → apparent throughput
collapses to 1/8th of the peak for the final stretch (~5 min visible
slowdown at the end).

Quick fix : double the default segment count.
- 8 segments  : last has 1.75 GB to finish alone
- 16 segments : last has 875 MB → tail ~halved

Tuning surfaced in Settings → Avancés → Serveur as
« Connexions parallèles pour les téléchargements (1-32, défaut 16) ».
Power users on faster servers can push to 24-32. OVH mutualisé tolerates
up to 16-24 ; above that, soft rate-limiting kicks in.

Aligned :
- LocalConfig default : 8 → 16
- DownloadManager clamp : Math.Clamp(_, 1, 16) → 1, 32
- HttpClient handler MaxConnectionsPerServer : 16 → 32 (matches new ceiling)

Versions bumped to 0.19.0.

Existing config.json files will keep their previous value (8) untouched ;
delete config.json to pick up the new default, or just bump it in
Settings → Avancés.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-03 18:28:35 +02:00
parent 0bd4c8a4be
commit 3c8438f3fe
9 changed files with 51 additions and 13 deletions

View File

@@ -112,16 +112,16 @@ public partial class App : Application
services.AddSingleton(sp =>
{
// Handler tuné pour les gros téléchargements parallèles :
// - MaxConnectionsPerServer=16 pour autoriser le multi-segment (8 par défaut).
// - AutomaticDecompression sur l'API JSON uniquement (None ici car les builds
// sont des ZIPs déjà compressés ; éviter la CPU+RAM gaspillée par un éventuel
// wrapping gzip côté serveur).
// - MaxConnectionsPerServer=32 pour aligner avec le clamp DownloadManager (8-32).
// Default WPF = 8 → trop bas pour notre multi-segment.
// - AutomaticDecompression=None : les builds sont des ZIPs déjà compressés ;
// éviter la CPU+RAM gaspillée par un éventuel wrapping gzip côté serveur.
// - PooledConnectionLifetime court pour éviter qu'OVH ferme nos sockets sous nous.
var handler = new SocketsHttpHandler
{
PooledConnectionLifetime = TimeSpan.FromMinutes(5),
PooledConnectionIdleTimeout = TimeSpan.FromSeconds(60),
MaxConnectionsPerServer = 16,
MaxConnectionsPerServer = 32,
EnableMultipleHttp2Connections = true,
AutomaticDecompression = System.Net.DecompressionMethods.None,
};

View File

@@ -15,9 +15,9 @@
<Product>PROSERVE Launcher</Product>
<Copyright>© 2026 ASTERION VR — All rights reserved</Copyright>
<RootNamespace>PSLauncher.App</RootNamespace>
<Version>0.18.0</Version>
<AssemblyVersion>0.18.0.0</AssemblyVersion>
<FileVersion>0.18.0.0</FileVersion>
<Version>0.19.0</Version>
<AssemblyVersion>0.19.0.0</AssemblyVersion>
<FileVersion>0.19.0.0</FileVersion>
<!-- Single-file self-contained publish profile (used by `dotnet publish`) -->
<PublishSingleFile>true</PublishSingleFile>

View File

@@ -49,6 +49,7 @@ public sealed partial class SettingsViewModel : ObservableObject
[ObservableProperty] private string _language;
[ObservableProperty] private string _reportUrl;
[ObservableProperty] private string _documentationUrl;
[ObservableProperty] private int _parallelSegments;
// ----- DB Migration settings -----
[ObservableProperty] private string _dbHost;
@@ -173,6 +174,7 @@ public sealed partial class SettingsViewModel : ObservableObject
_language = string.IsNullOrWhiteSpace(config.Language) ? "auto" : config.Language;
_reportUrl = config.ReportUrl;
_documentationUrl = config.DocumentationUrl;
_parallelSegments = config.ParallelDownloadSegments;
_dbHost = config.Database.Host;
_dbPort = config.Database.Port;
@@ -303,6 +305,7 @@ public sealed partial class SettingsViewModel : ObservableObject
_config.Language = Language ?? "auto";
_config.ReportUrl = ReportUrl?.Trim() ?? "";
_config.DocumentationUrl = DocumentationUrl?.Trim() ?? "";
_config.ParallelDownloadSegments = Math.Clamp(ParallelSegments, 1, 32);
// DB settings
_config.Database.Host = DbHost.Trim();

View File

@@ -230,6 +230,19 @@
Background="#1A1A20" Foreground="{StaticResource Brush.Text.Primary}"
BorderBrush="{StaticResource Brush.Border}" BorderThickness="1" Padding="8"
FontFamily="Consolas" />
<!-- Connexions parallèles : tuning de la queue de fin de DL -->
<TextBlock Text="{x:Static loc:Strings.SettingsParallelSegments}"
Foreground="{StaticResource Brush.Text.Secondary}"
FontSize="12" Margin="0,16,0,4" />
<TextBox Text="{Binding ParallelSegments, UpdateSourceTrigger=PropertyChanged}"
Background="#1A1A20" Foreground="{StaticResource Brush.Text.Primary}"
BorderBrush="{StaticResource Brush.Border}" BorderThickness="1" Padding="8"
Width="80" HorizontalAlignment="Left" />
<TextBlock Text="{x:Static loc:Strings.SettingsParallelSegmentsHint}"
Foreground="{StaticResource Brush.Text.Secondary}"
FontSize="11" FontStyle="Italic" Margin="0,4,0,0"
TextWrapping="Wrap" />
</StackPanel>
</Border>