447 Commits
Author SHA1 Message Date
xtaci ab9f0f36cb Merge branch 'dev' v1.5.53 2026-01-26 15:17:53 +08:00
xtaci 4af4b02304 use bufferRing in stream.go to reduce memory allocations 2026-01-26 15:17:20 +08:00
xtaci bac164dea7 Merge branch 'dev' 2026-01-26 14:35:46 +08:00
xtaci e2bbc82e3e Remove per-iteration buffer realloc in benchmark to cut noise.
Improve throughput and lower allocations in BenchmarkConnSmux.
2026-01-26 14:34:00 +08:00
xtaci a76bdd49fd Merge branch 'dev' v1.5.52 2026-01-25 22:56:40 +08:00
xtaci cb81ae99ee perf: reduce memory allocations in hot paths
- Add writeRequestPool to reuse writeRequest objects and their result
  channels in session.go, reducing allocations per write operation

- Add shaperHeapPool to reuse shaperHeap objects in shaper.go, avoiding
  heap allocations when streams are created/destroyed

- Pre-allocate buffers and heads slices with capacity 8 in newStream()
  to reduce slice growth allocations during data transfer

Benchmark results (128KB data transfer):
  Before: 36 allocs/op, ~910 MB/s
  After:  20 allocs/op, ~950 MB/s

This reduces memory allocations by 44% and improves throughput by ~5%.
2026-01-25 22:56:15 +08:00
xtaci c4b7d47a00 Squashed commit of the following:
commit c8a401fdb4
Author: xtaci <imap@live.com>
Date:   Sat Jan 24 22:29:03 2026 +0800

    fix(session): reject cmdUPD in protocol version 1

    cmdUPD is a v2-only command used for flow control window updates.
    Previously, recvLoop would accept and process cmdUPD even when
    the session was configured for protocol version 1, which violates
    the protocol specification.

    This change adds a version check before processing cmdUPD. If the
    session is not running v2, it now correctly returns ErrInvalidProtocol
    and terminates the receive loop.
v1.5.51
2026-01-24 22:29:37 +08:00
xtaci c8a401fdb4 fix(session): reject cmdUPD in protocol version 1
cmdUPD is a v2-only command used for flow control window updates.
Previously, recvLoop would accept and process cmdUPD even when
the session was configured for protocol version 1, which violates
the protocol specification.

This change adds a version check before processing cmdUPD. If the
session is not running v2, it now correctly returns ErrInvalidProtocol
and terminates the receive loop.
2026-01-24 22:29:03 +08:00
xtaci 8dbcbb3da5 update header diagram v1.5.50 2025-12-22 17:52:04 +08:00
xtaci 5a2ce88084 fix readme 2025-12-21 21:27:38 +08:00
xtaci 353ea28299 refine readme 2025-12-21 21:24:51 +08:00
xtaci f6987ac177 fix chinese readme 2025-12-21 17:45:28 +08:00
xtaci 9ffe1ca9d3 optimize chinese readme 2025-12-21 12:04:59 +08:00
xtaci 31c31ad521 Add files via upload 2025-12-21 11:47:39 +08:00
xtaci 791402fd48 add Reference section 2025-12-21 11:43:58 +08:00
xtaci cbdd1a6d0c update README 2025-12-20 19:37:35 +08:00
xtaci a947aa6edf update README 2025-12-20 19:24:24 +08:00
xtaci 7188ee01aa update README 2025-12-20 19:22:53 +08:00
xtaci 091ca6f2d8 add chinese readme 2025-12-20 19:19:19 +08:00
xtaci 4576cac032 add more tests for session and shaper
uncomment
2025-12-19 19:57:52 +08:00
xtaci 2e3badcf3d add more test for shaper 2025-12-19 19:31:36 +08:00
xtaci 3b4ec71231 optimize: avoid memory leak 2025-12-19 19:27:16 +08:00
xtaci 02f4e56db0 add AGENTS.md 2025-12-19 15:56:33 +08:00
xtaci 13204104b9 add testcase to alloc_test.go 2025-12-19 12:48:49 +08:00
xtaci 129520968d Fix memory leak caused by buffer capacity modification during read operations preventing successful allocator recycling. v1.5.49 2025-12-19 12:26:17 +08:00
xtaci bbc15a0bcb Merge branch 'dev' v1.5.48 2025-12-18 17:56:40 +08:00
xtaci b7a5d16a75 properly stop the timer to avoid resource leaks, and add a limit for MaxReceiveBuffer
uncomment
2025-12-18 17:54:27 +08:00
xtaci e49a716823 make numWritten consistent 2025-12-18 17:14:12 +08:00
xtaci a78910018b make the critical section small 2025-12-18 17:12:28 +08:00
xtaci 60be49e34a optimize README.md 2025-12-17 21:36:40 +08:00
FULI 9d6ba58882 Add files via upload 2025-12-14 19:52:30 +08:00
FULI 9eefa8add2 Add files via upload 2025-12-14 19:40:03 +08:00
xtaci 9275ee358c fix TestGetDieCh testcase
fix TestGetDieCh
v1.5.47
2025-12-14 18:01:21 +08:00
xtaci d3df2cdee1 add comments 2025-12-14 15:23:59 +08:00
xtaci 8684a3fa1a chores: rename variable for clarity 2025-12-14 13:51:35 +08:00
xtaci c9c21c1cd5 optmize: use simpler way to detect uint32 overflow 2025-12-14 13:45:06 +08:00
xtaci 3b644df082 add a comment 2025-12-14 12:59:31 +08:00
FULI 35dc1542bc Add files via upload 2025-12-14 11:59:24 +08:00
FULI d422478db8 Add files via upload 2025-12-14 11:57:31 +08:00
FULI d9e70a4dd0 Add files via upload 2025-12-14 11:49:35 +08:00
xtaci 18fbbf99f8 (chores): optimize function structure and allow writers to change the deadline during waiting for window update.
rename vars
2025-12-13 22:36:52 +08:00
xtaci 436b220390 chores: removed an useless notify in fin command, and optimized comments in session.go 2025-12-13 21:33:24 +08:00
xtaci 782c885721 optimize test for large bulk of data transfer 2025-12-11 21:18:47 +08:00
xtaci d6a40fdff0 upd v1.5.46 2025-12-10 13:57:38 +08:00
xtaci 0f82c6d5d6 Merge branch 'rbqvq-dev' v1.5.45 2025-12-10 11:37:20 +08:00
xtaci 18a98822ed add random length send for 1GB 2025-12-10 11:27:11 +08:00
xtaci eeb8413475 add functions to test data transfer for 8GB 2025-12-10 11:27:11 +08:00
xtaci af7a8d72d4 add random length send for 1GB 2025-12-10 10:06:23 +08:00
xtaci 1889f622bb add functions to test data transfer for 8GB 2025-12-10 09:56:20 +08:00
Coia Prant 8440c70ccb refactor: tests 2025-12-09 23:39:20 +08:00