Skip to content

feat: batch methods - #64

Open
InvalidJoker wants to merge 3 commits into
devfrom
feat/modpack-stuff
Open

InvalidJoker wants to merge 3 commits into
devfrom
feat/modpack-stuff

Conversation

@InvalidJoker

Copy link
Copy Markdown
Member

No description provided.

Assisted-By: Claude Opus 5.5
@InvalidJoker
InvalidJoker requested a review from 0xIO32 October 16, 2026 13:12
@InvalidJoker
InvalidJoker marked this pull request as ready for review October 16, 2026 13:12
@0xIO32

0xIO32 commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Why?

If the reason for a feature is not obvious, you must provide it. Either in this pull request or in the commit msg. The later is preferred.

Comment thread daemon/src/files/batch.rs
Comment thread daemon_common/src/service/files.rs Outdated
@InvalidJoker

Copy link
Copy Markdown
Member Author

Why?

If the reason for a feature is not obvious, you must provide it. Either in this pull request or in the commit msg. The later is preferred.

reason for this is because of the modpack installer and other upcomming features which download many files at once which would be pretty dumb to do one request for every file

@InvalidJoker
InvalidJoker requested a review from 0xIO32 October 16, 2026 14:06
@0xIO32

0xIO32 commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Not sure why. reqwest uses connection pooling and supports http2, so a new request does not mean a new connection (there will likely even be idle connections in the pool). Axum and reqwest can handle 100 requests at the same time without any issues. In case of download, there should be no disadvantage of calling write_file_by_url 100x times over using a batch method. Well, it will open 100x requests to the download target though currently, so maybe a global request limit per host makes sense. But overall, results in the same behavior. Even more so for file operations.

@0xIO32

0xIO32 commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Well I guess it probably has some benefits doing it that way, but it also makes the code more convoluted. Not sure if its worth the trade.

@0xIO32

0xIO32 commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

@InvalidJoker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants