curl-curl/docs/internals
Stefan Eissing 2de22a00c7
lib: keep timestamp in easy handle
Use `data->progress.now` as the timestamp of proecssing a transfer.
Update it on significant events and refrain from calling `curlx_now()`
in many places.

The problem this addresses is
a) calling curlx_now() has costs, depending on platform. Calling it
   every time results in 25% increase `./runtest` duration on macOS.
b) we used to pass a `struct curltime *` around to save on calls, but
   when some method directly use `curx_now()` and some use the passed
   pointer, the transfer experienes non-linear time. This results in
   timeline checks to report events in the wrong order.

By keeping a timestamp in the easy handle and updating it there, no
longer invoking `curlx_now()` in the "lower" methods, the transfer
can observer a steady clock progression.

Add documentation in docs/internals/TIME-KEEPING.md

Reported-by: Viktor Szakats
Fixes #19935
Closes #19961
2025-12-16 08:48:44 +01:00
..
BUFQ.md docs: fold long lines 2025-12-11 11:42:28 +01:00
BUFREF.md bufref: add Curl_bufref_dup that returns a strdup()ed version 2025-12-04 19:04:19 +01:00
CHECKSRC.md build: stop overriding standard memory allocation functions 2025-11-28 10:44:26 +01:00
CLIENT-READERS.md docs: fold long lines 2025-12-11 11:42:28 +01:00
CLIENT-WRITERS.md docs: fold long lines 2025-12-11 11:42:28 +01:00
CODE_STYLE.md GHA/checkdocs: re-enable proselint, update setup, fix issues found 2025-12-11 11:42:28 +01:00
CONNECTION-FILTERS.md docs: fold long lines 2025-12-11 11:42:28 +01:00
CURLX.md curlx: move the docs to docs/internals/ 2025-05-13 10:30:02 +02:00
DYNBUF.md curlx: move into to curlx/ 2025-05-07 11:01:15 +02:00
HASH.md lib: add meta_hash to connection, eliminate hash_offt 2025-04-22 15:57:18 +02:00
LLIST.md docs: use lowercase curl and libcurl 2025-01-02 17:15:54 +01:00
MID.md multi: do transfer book keeping using mid 2025-04-17 17:28:38 +02:00
MQTT.md docs: fold long lines 2025-12-11 11:42:28 +01:00
MULTI-EV.md multi: event based rework 2025-02-22 14:47:40 +01:00
NEW-PROTOCOL.md GHA: silence proselint warnings and an error 2024-10-15 16:44:17 +02:00
PORTING.md docs/internals/PORTING.md: new document 2025-03-29 14:10:10 +01:00
RATELIMITS.md ratelimit: redesign 2025-11-24 23:34:05 +01:00
README.md
SCORECARD.md docs: fold long lines 2025-12-11 11:42:28 +01:00
SPLAY.md internals/SPLAY.md: internal API documentation 2024-08-16 17:13:37 +02:00
STRPARSE.md spelling: call it null-terminate consistently 2025-05-30 17:29:45 +02:00
TIME-KEEPING.md lib: keep timestamp in easy handle 2025-12-16 08:48:44 +01:00
TLS-SESSIONS.md docs: fold long lines 2025-12-11 11:42:28 +01:00
UINT_SETS.md docs: fold long lines 2025-12-11 11:42:28 +01:00
WEBSOCKET.md websocket: add option to disable auto-pong reply 2025-04-19 00:01:28 +02:00

Internals

This directory contains documentation covering libcurl internals; APIs and concepts that are useful for contributors and maintainers.

Public APIs are documented in the public documentation, not here.