Skip to content

statement-store: process messages from peers in parallel #10892

@alexggh

Description

@alexggh

Versi testing showed that with 15 peers on_statements ends-up eating a lot of time

pub fn on_statements(&mut self, who: PeerId, statements: Statements) {
, because you receive a uniqu estatement multiple times from different peers.

take_recent: 1905.586994 ms
propagate: 15300.300315 ms,
on_stmts: 39057.180931 ms,
submit_worker_0: 27269.046068 ms,
submit_worker_1: 27177.651354 ms,
submit_worker_2: 27178.792487 ms,
submit_worker_3: 27267.589758 ms

Proposed solution

Run the on_statements logic on a separate worker pool rather on the main thread.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions