shotover / shotover-proxy

L7 data-layer proxy
https://docs.shotover.io
Apache License 2.0
83 stars 16 forks source link

splitup ChainState type #1731

Open rukai opened 3 weeks ago

rukai commented 3 weeks ago

This was an experiment to see if we could remove the confusing 'shorter/'longer lifetimes from the transform definition. And I think it was a success!

Decoupling the transform iterator from the rest of ChainState gives us two design improvements:

One downside is that calling the call_next_transform method is now a little more convoluted as it takes an arg. But I also think this makes it a little clearer what its actually doing.

I'll leave the PR as a draft for a while so I can think it over a bit.

codspeed-hq[bot] commented 3 weeks ago

CodSpeed Performance Report

Merging #1731 will improve performances by 10.23%

Comparing rukai:refactor-Wrapper (42597ae) with main (837d5d6)

Summary

⚡ 1 improvements ✅ 38 untouched benchmarks

Benchmarks breakdown

Benchmark main rukai:refactor-Wrapper Change
encode_system.local_query_v4_lz4_compression 14.5 µs 13.2 µs +10.23%