Conversation
Contributor
|
建议你同步一下上游,现在上游的目录结构有比较大的改变 |
# Conflicts: # PCL.Core/IO/Download/IDlConnection.cs # PCL.Core/IO/Download/IDlResourceMapping.cs # PCL.Core/IO/Download/IDlWriter.cs # PCL.Core/IO/Download/NDlFactory.cs # PCL.Core/Net/NDownload/IDlConnection.cs # PCL.Core/Net/NDownload/IDlResourceMapping.cs # PCL.Core/Net/NDownload/IDlWriter.cs # PCL.Core/Net/NDownload/Interfaces/IDlConnection.cs # PCL.Core/Net/NDownload/Interfaces/IDlResourceMapping.cs # PCL.Core/Net/NDownload/Interfaces/IDlWriter.cs
0584502 to
0ce13e0
Compare
Member
Author
done |
ruattd
requested changes
Feb 21, 2026
Contributor
ruattd
left a comment
There was a problem hiding this comment.
存在几个问题:
- 应该存在一个全局共用的线程数限制
- 应当支持处理多个文件和多次提交,并复用已有的 DownloadClient 实例,一个下载任务很可能包含一大批文件且可能先后多次提交,它们要与已存在的所有任务共享全局线程数限制,在有必要的时候需要排队机制
- HttpClient 应使用传入 getter delegate 的方式获取,每次下载均创建一个 HttpClient 会导致大量小文件下载时初始化时长远大于实际数据传输时长,极其影响性能
- 需要支持持久化 mirror 数据,因为一个 mirror 的质量在一个用户那里大概率是一直相同的,每次都收集数据并动态决策本身就是很耗时的操作了(因此也引出了新的问题:需要考虑更复杂更全面的 mirror 评估算法)
- 测试明显像 AI 写的,代码的 AI 参与度比较存疑,这点需要一个明确解释
Member
Author
测试懒得写,直接丢给AI让他写了(
这个PR只是一个底层的部分,我计划把这个作为上层部分来实现(DownloadManager)
我实在想不出来,请大神来co-auther |
copytiao
requested changes
Feb 24, 2026
ruattd
requested changes
Feb 24, 2026
Contributor
ruattd
left a comment
There was a problem hiding this comment.
建议实现一个测试模仿 MC 客户端安装的密集小文件下载,试试性能,如果你不知道下什么就直接硬编码一个最新版的所有资源文件就好了
另,如果你对 req changes 有什么疑问请提出来,而不是自己闷头写一堆不符合需求的代码,我觉得你对我上个 req 的内容就是没懂或者疑问很多
Member
Author
yeah, i pretty sure i didnt understand what you mean at your last commit thk for your suggestion. im goona make some change |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
普普通通的下载器。
因为过于久远,我忘了要求,如果哪里不好提个review。
使用方法见
PCL.Core.Test.Downloader.RealFileDownloadTests.DownloadFile_ShouldCompleteSuccessfully()