Repository navigation
Conversation
Replace several curltime members with timediff_t in connectdata. Everyone needs a shrink!
There was a problem hiding this comment.
🟡 Changes recommended
Two moderate timing issues must be resolved before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Reduces connectdata memory usage by storing several timestamps as millisecond offsets from connection creation.
Changes:
- Converts idle, upkeep, health-check, and shutdown timestamps to
timediff_t. - Reworks timestamp calculations and updates shutdown tests.
File summaries
| File | Review |
|---|---|
tests/unit/unit2606.c |
Updates shutdown-state test fixtures. |
lib/urldata.h |
Defines offset-based timestamp fields. |
lib/url.c |
Has a moderate queue-time regression caused by reusing an earlier mutable timestamp. |
lib/connect.c |
Has a moderate shutdown-state issue where zero aliases the “not started” sentinel. |
lib/conncache.c |
Converts connection-pool timing calculations. |
lib/cfilters.c |
Clears offset-based shutdown state. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+124
to
+125
| conn->shutdown.start_ms[sockindex] = | ||
| curlx_ptimediff_ms(pnow, &conn->created); |
This is closer to how the timer is documented.
bagder
approved these changes
Sep 3, 2026
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.
Replace several curltime members with timediff_t in connectdata.
Everyone needs a shrink!