Skip to content
Snippets Groups Projects
user avatar
Alexandru Gheorghe authored
Candidate validation has a lot of operations that are cpu bound on its
main loop things, like:
```
validation_code.hash()
sp_maybe_compressed_blob::decompress(
		&validation_code.0,
		VALIDATION_CODE_BOMB_LIMIT,
)

sp_maybe_compressed_blob::decompress(&pov.block_data.0, POV_BOMB_LIMIT) 
let code_hash = sp_crypto_hashing::blake2_256(&code).into();
```

When you add all that you for large POV and CODE it is going to take in
the order of 10s of ms and because these are cpu bound operation it is
going to hog the executor thread and negatively affect other subsystems
around it, so it is better to just move the subsystem on the blocking
pool to make sure such unexpected behaviour is avoided.

Note! In practice this subsystem does not have a high number of work to
be done, so probably the impact of it is really low, but better safe
than sorry.

Signed-off-by: default avatarAlexandru Gheorghe <alexandru.gheorghe@parity.io>
ff2e7dbd
Name Last commit Last update
..
examples
src
Cargo.toml