feat(zmodem): accelerate upload and download transfers - #3147
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1768e8d993
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // (drain check + yield + progress IPC), so larger chunks amortize that | ||
| // overhead across many more bytes. The wire subpackets stay at the | ||
| // library's 8192-byte MAX_CHUNK_LENGTH. | ||
| const UPLOAD_CHUNK_SIZE = 1024 * 1024; |
There was a problem hiding this comment.
Preserve bounded chunks when no drain waiter exists
Keep the smaller upload granularity for transports without a real drain implementation. I checked the supported first-party local PTY, ET, Mosh, Telnet, and serial registrations, and none supplies waitForTransportDrain; when their writeToRemote() returns false, createZmodemUploadDrainWaiter() merely clears _needsDrain after one setImmediate. Because xfer.send() synchronously queues the entire chunk before that check, this change now queues another 1 MiB on every event-loop turn regardless of whether the slow writable has drained, allowing large uploads to grow the process buffer toward the file size and potentially exhaust memory or lose the session.
Useful? React with 👍 / 👎.
|
@codex review |
1 similar comment
|
@codex review |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4bbb7468f7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
直接粘贴以下内容: