Repository navigation
perf(transport): don't build and drop an Error per decoded frame field - #4416
larseggert wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the QUIC frame-decoding optimization.
No open issues 🎉
What changed in this PR
This PR optimizes QUIC frame decoding by constructing Error::FrameEncoding only when a decoded value is missing, preserving existing success and error behavior.
Changes:
- Replaces eager
ok_orerror construction withlet ... else. - Adds a comment explaining why
ok_oris avoided.
| File | Description |
|---|---|
neqo-transport/src/frame.rs |
Updates the decoding helper to avoid constructing and dropping an error for present values. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4416 +/- ##
=======================================
Coverage 96.61% 96.62%
=======================================
Files 118 118
Lines 43894 43896 +2
Branches 43894 43896 +2
=======================================
+ Hits 42410 42415 +5
+ Misses 1463 1460 -3
Partials 21 21
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Failed Interop TestsQUIC Interop Runner, client vs. server, differences relative to
All resultsSucceeded Interop TestsQUIC Interop Runner, client vs. server neqo-pr as client
neqo-pr as server
Unsupported Interop TestsQUIC Interop Runner, client vs. server neqo-pr as client
neqo-pr as server
|
Merging this PR will regress 4 benchmarks1 warning
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing |
Client/server transfer resultsPerformance differences relative to c46d346. Transfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.
Table above only shows statistically significant changes. See all results below. All resultsTransfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.
Download data for |
Benchmark resultsNo significant performance differences relative to c46d346. All resultstransfer/1-conn/1-100mb-req (aka. Upload)/mtu-1500 time: [62.467 ms 62.513 ms 62.559 ms]
thrpt: [1.5610 GiB/s 1.5622 GiB/s 1.5633 GiB/s]transfer/1-conn/1-100mb-resp (aka. Download)/mtu-1500 time: [63.336 ms 63.407 ms 63.481 ms]
thrpt: [1.5384 GiB/s 1.5401 GiB/s 1.5419 GiB/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mildtransfer/1-conn/1-1b-resp (aka. HPS)/mtu-1500 time: [3.8072 ms 3.8085 ms 3.8098 ms]
thrpt: [262.48 B/s 262.57 B/s 262.66 B/s]
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mildtransfer/1-conn/10_000-parallel-1b-resp (aka. RPS)/mtu-1500 time: [87.388 ms 87.539 ms 87.693 ms]
thrpt: [114.03 Kelem/s 114.23 Kelem/s 114.43 Kelem/s]streams-flow-controlled/walltime/1-streams/each-4194304-bytes time: [13.314 ms 13.332 ms 13.348 ms]
thrpt: [299.68 MiB/s 300.04 MiB/s 300.43 MiB/s]
Found 11 outliers among 100 measurements (11.00%)
11 (11.00%) low mildstreams-flow-controlled/walltime/10-streams/each-1048576-bytes time: [35.403 ms 35.450 ms 35.496 ms]
thrpt: [281.72 MiB/s 282.09 MiB/s 282.47 MiB/s]streams/walltime/1-streams/each-1000-bytes time: [163.60 µs 164.31 µs 165.20 µs]
thrpt: [5.7730 MiB/s 5.8042 MiB/s 5.8292 MiB/s]
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mildstreams/walltime/1000-streams/each-1-bytes time: [4.7780 ms 4.7795 ms 4.7810 ms]
thrpt: [204.26 KiB/s 204.32 KiB/s 204.39 KiB/s]streams/walltime/1000-streams/each-1000-bytes time: [15.305 ms 15.315 ms 15.324 ms]
thrpt: [62.234 MiB/s 62.271 MiB/s 62.310 MiB/s]
Found 8 outliers among 100 measurements (8.00%)
8 (8.00%) low mildtransfer/walltime/pacing-false/same-seed time: [3.5069 ms 3.5090 ms 3.5117 ms]
thrpt: [1.1124 GiB/s 1.1132 GiB/s 1.1139 GiB/s]transfer/walltime/pacing-false/varying-seeds time: [3.5016 ms 3.5027 ms 3.5041 ms]
thrpt: [1.1148 GiB/s 1.1152 GiB/s 1.1156 GiB/s]
Found 12 outliers among 100 measurements (12.00%)
12 (12.00%) high mildtransfer/walltime/pacing-true/same-seed time: [3.9970 ms 3.9996 ms 4.0026 ms]
thrpt: [999.36 MiB/s 1000.1 MiB/s 1000.7 MiB/s]transfer/walltime/pacing-true/varying-seeds time: [3.9137 ms 3.9151 ms 3.9169 ms]
thrpt: [1021.2 MiB/s 1021.7 MiB/s 1022.1 MiB/s]
Found 11 outliers among 100 measurements (11.00%)
8 (8.00%) high mild
3 (3.00%) high severeInstructions per cycleCriterion reported no significant timing changes. All benchmarks
Profiles for profiler.firefox.com (64)
Download data for |
ok_orbuilds theErroreven when the value is present and then drops it;let ... elseavoids that.