pingora icon indicating copy to clipboard operation
pingora copied to clipboard

Performance: remove async-trait

Open Congyuwang opened this issue 1 year ago • 3 comments

Since async trait is now stable in rust. We can think of removing relying on the the async-trait macro, which requires returning Boxed Future which is less efficient than using rust native async trait.

Congyuwang avatar Jan 10 '25 14:01 Congyuwang

Unless use generic to generate nested HttpModules at compile time. Current Rust AFIT isn't dyn compatible, so Box<dyn HttpModule> not works.

taikulawo avatar Jan 27 '25 12:01 taikulawo

Unless use generic to generate nested HttpModules at compile time. Current Rust AFIT isn't dyn compatible, so Box not works.

Oh right, that makes sense.

Congyuwang avatar Jan 28 '25 02:01 Congyuwang

We will keep this issue open but until std async trait becomes 1:1 replacement for async-trait, no action to make here

eaufavor avatar Feb 01 '25 00:02 eaufavor