Async FS optimizations, exponential backoff, cleanup dedup and release v1.4.72
Build and Release / build (push) Has been cancelled
Build and Release / build (push) Has been cancelled
- Convert all sync FS ops (existsSync, readdirSync, statSync, writeFileSync, rmSync, renameSync) to async equivalents across download-manager, extractor, cleanup, storage, and logger to prevent UI freezes - Replace linear retry delays with exponential backoff + jitter to prevent retry storms with many parallel downloads - Deduplicate resolveArchiveItems into single shared function - Replace Array.shift() O(N) in bandwidth chart with slice-based trimming - Make logger rotation async in the async flush path Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
520ef91d2d
commit
e485cf734b
@@ -239,8 +239,12 @@ const BandwidthChart = memo(function BandwidthChart({ items, running, paused }:
|
||||
history.push({ time: now, speed: paused ? 0 : totalSpeed });
|
||||
|
||||
const cutoff = now - 60000;
|
||||
while (history.length > 0 && history[0].time < cutoff) {
|
||||
history.shift();
|
||||
let trimIndex = 0;
|
||||
while (trimIndex < history.length && history[trimIndex].time < cutoff) {
|
||||
trimIndex += 1;
|
||||
}
|
||||
if (trimIndex > 0) {
|
||||
speedHistoryRef.current = history.slice(trimIndex);
|
||||
}
|
||||
|
||||
lastUpdateRef.current = now;
|
||||
|
||||
Reference in New Issue
Block a user