paritytech / subxt

Interact with Substrate based nodes in Rust or WebAssembly
Other
425 stars 248 forks source link

Speed up Tests #877

Closed jsdw closed 1 year ago

jsdw commented 1 year ago

Tests (particularly the integration tests I think) take >20mins to complete; can we speed this up? Does cargo nextest help at all (did we try it and find it didn't?). Any other way to parallelise tests? Worth running them on Gitlab or something instead? It'd be amazing if we could get this to under 5 mins :)

jsdw commented 1 year ago

https://github.com/paritytech/subxt/pull/928 really helped and has sped things up a fair bit.

Other things we can investigate:

Probably more painful and less wins:

tadeohepperle commented 1 year ago

@jsdw I found out that invocation of the subxt macro takes about 110ms on my machine for the polkadot.scale metadata that is 346KB in size. I created a stripped down version of the default substrate metadata (without any pallets) that is just 6.43KB in size. It reduces the time of macro invocation to about 2.5ms. This is a pretty linear speed up (50x smaller -> 50x faster). Hoverever this is just the macro invocation which is, (just my guess) probably a lot times faster than the actual compilation of the generated code.