Starward icon indicating copy to clipboard operation
Starward copied to clipboard

opt: downloader

Open Eric-Joker opened this issue 6 months ago • 7 comments

#1003 反复重做,重开个pr。

  • 使用平滑窗口平均 平滑速度计算、剩余时间估计。
  • 在继续任务前,确保之前的任务线程均结束,避免文件被占用。
  • 任务发生任何崩溃均将任务添加回_installItemQueue。
  • 优化下载限速器

与当前限速器的区别:

  • 精细化令牌补充间隔,避免流量全堆积在单位时间的开始、减少实际即时速度的误差。
  • 不限速时不使用限流器,以减少性能消耗。
  • 使用https://github.com/Scighost/Starward/pull/1019#issuecomment-2272553820 的方式实现精确控制速度,数据流恢复为16KB避免I/O过于频繁。
  • 将限速设置的NumberBox上限设为2097151(int.MaxValue / 1024向下取整)

close #996 , close #997

Eric-Joker avatar Aug 05 '24 02:08 Eric-Joker