Keep the external interface to async transactions mostly unchanged, but delegate to internal functions that (as much as possible) avoid using generic functions.
This is intended to reduce code generation. For a debug build of omicron-nexus, this reduces the (debug build, Linux) binary size from 514 MiB to 497 MiB.
A... common case here are closures: by default, prefer &dyn Fn() over impl Fn(). Similarly to paths, an impl-based nice API might be a thin wrapper around dyn-based implementation which does the bulk of the work.
Keep the external interface to async transactions mostly unchanged, but delegate to internal functions that (as much as possible) avoid using generic functions.
This is intended to reduce code generation. For a debug build of
omicron-nexus
, this reduces the (debug build, Linux) binary size from 514 MiB to 497 MiB.Source for idea: https://matklad.github.io/2021/09/04/fast-rust-builds.html#Keeping-Instantiations-In-Check