Skip to content

progress: cleanup, less memory - #22547

Closed
icing wants to merge 2 commits into
curl:masterfrom
icing:easy-progress-improve
Closed

icing wants to merge 2 commits into
curl:masterfrom
icing:easy-progress-improve

Conversation

@icing

@icing icing commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Keep only a single start time and calculate the rest in delta microseconds since then. Separate timestamps and durations into separate sub-structures for clarity.

Shaves some more bytes off the easy handle.

@icing icing added the tidy-up label Aug 11, 2026
@github-actions github-actions Bot added the tests label Aug 11, 2026
@icing
icing force-pushed the easy-progress-improve branch from 2fb7cc9 to e46a2dc Compare August 11, 2026 15:10
@curl curl deleted a comment from testclutch Aug 12, 2026
@icing
icing force-pushed the easy-progress-improve branch from e46a2dc to b48ba67 Compare August 12, 2026 08:51
@icing
icing requested a review from bagder August 12, 2026 09:10
@bagder
bagder requested a balanced review from Copilot August 12, 2026 10:20

@bagder bagder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

me like!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors progress timing to reduce easy-handle memory usage using one start timestamp and microsecond offsets.

Changes:

  • Separates timing offsets and accumulated durations.
  • Migrates timeout, progress, and getinfo calculations.
  • Updates related unit tests and removes the unused FTP accept timer.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
lib/progress.c Implements offset-based timing and speed tracking.
lib/progress.h Updates progress timing APIs and timer IDs.
lib/urldata.h Reorganizes progress timing storage.
lib/getinfo.c Reads timing values from the new structures.
lib/connect.c Uses offset-based timeout calculations.
lib/multi.c Updates elapsed timeout reporting.
lib/transfer.c Migrates progress initialization and timeout reporting.
lib/tftp.c Migrates TFTP progress initialization.
lib/ftp.c Removes unused accept timing.
lib/cf-ip-happy.c Migrates connection elapsed-time reporting.
lib/vdns/cf-dns.c Migrates DNS timeout reporting.
tests/unit/unit1303.c Adapts timeout tests to offset timing.
tests/unit/unit1399.c Adapts cumulative timing tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/progress.c Outdated
Comment thread lib/progress.c Outdated
Comment thread lib/progress.c
Comment thread lib/tftp.c Outdated
icing added 2 commits August 12, 2026 14:18
Keep only a single `start` time and calculate the rest
in delta microseconds since then. Separate timestamps
and durations into separate sub-structures for clarity.

remove progress.t_acceptdata
It was recorded in FTP accept but never used anywhere.
@icing
icing force-pushed the easy-progress-improve branch from b48ba67 to c7f5ec7 Compare August 12, 2026 12:27
@bagder bagder closed this in 35843dd Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants