1
0
mirror of https://gitlab.gnome.org/GNOME/glib.git synced 2026-10-24 00:49:00 +03:00
Files
glib/gio/tests
Christian Hergert 4d265ed042 gio: Pipeline and enlarge output stream splices
The default splice implementations used 8 KiB buffers. In the
asynchronous implementation, mixed native-async and worker-backed
streams therefore alternated between reading on the main context and
dispatching each small write through the worker pool.

Use 256 KiB buffers for both synchronous and asynchronous splices to
amortize syscall and dispatch overhead. Allocate the synchronous
buffer on the heap to avoid growing the stack.

Use two buffers for asynchronous splices so the next input read can
run while the previous output write drains. Keep at most one operation
outstanding on each stream to preserve their concurrency guarantees
and provide bounded backpressure.

Stop scheduling new operations after the first error, but wait for any
overlapping callback before completing the splice. This keeps task
lifetimes safe and preserves partial-write, cancellation, close, and
error-reporting semantics.

In a local 1 GiB libsoup download benchmark, this reduced asynchronous
splice time from 3.09 seconds to 0.44 seconds.

Add deterministic tests for synchronous bulk copies, asynchronous
buffer overlap, ordering, partial writes, concurrent read and write
failures, cancellation during overlap, and all close-flag
combinations.
2026-08-22 14:26:52 +02:00
..
…
2025-09-03 21:47:11 +02:00
…
2026-07-14 12:42:00 +01:00
2026-07-14 12:42:00 +01:00
2025-09-03 21:47:11 +02:00
…
2025-09-03 21:47:11 +02:00
2025-09-03 21:47:11 +02:00
2025-09-03 21:47:11 +02:00
…
…
…