Repository navigation
Commit c61b4c1
perf(relay): share event with sig-verify task via Arc instead of deep clone
verify_event only needs a borrow; spawn_blocking only needs 'static.
Wrapping the event in an Arc avoids deep-cloning tags + up to 256 KB of
content on every ingest. After verification the Arc is uniquely held
(the verify task's clone is dropped on completion), so try_unwrap
returns the original event; the clone fallback is unreachable in
practice but keeps the code total.
W8 in PLANS/RELAY_PERF_OPTIMIZATION_PLAN.md; ruled GREEN (no invariant
touched) in RESEARCH/RELAY_PERF_CORRECTNESS.md. cargo test -p buzz-relay:
436 passed, 0 failed.
Co-authored-by: Tyler Longwell <[email protected]>
Signed-off-by: Tyler Longwell <[email protected]>1 parent 605f712 commit c61b4c1
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1244 | 1244 | | |
1245 | 1245 | | |
1246 | 1246 | | |
1247 | | - | |
1248 | | - | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
1249 | 1254 | | |
1250 | 1255 | | |
1251 | 1256 | | |
| |||
1258 | 1263 | | |
1259 | 1264 | | |
1260 | 1265 | | |
| 1266 | + | |
1261 | 1267 | | |
1262 | 1268 | | |
1263 | 1269 | | |
| |||
0 commit comments