mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 20:17:57 +00:00
Move candidate-validation on blocking tasks (#3122)
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: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
This commit is contained in:
committed by
GitHub
parent
85191e94b5
commit
ff2e7dbd35
@@ -465,7 +465,7 @@ pub async fn forward_events<P: BlockchainEvents<Block>>(client: Arc<P>, mut hand
|
||||
message_capacity=2048,
|
||||
)]
|
||||
pub struct Overseer<SupportsParachains> {
|
||||
#[subsystem(CandidateValidationMessage, sends: [
|
||||
#[subsystem(blocking, CandidateValidationMessage, sends: [
|
||||
RuntimeApiMessage,
|
||||
])]
|
||||
candidate_validation: CandidateValidation,
|
||||
|
||||
Reference in New Issue
Block a user