Do not parallelize deserialize operation (#1663)

Deserialize operations are faster when done serially with the
MT banking stage and helps with performance improvement with
reduced thread context switches.
This commit is contained in:
Sathish 2018-10-31 22:12:15 -07:00 committed by GitHub
parent 5ecb9da801
commit dffa2eb04f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -11,7 +11,6 @@ use log::Level;
use packet::Packets;
use poh_recorder::{PohRecorder, PohRecorderError};
use poh_service::{Config, PohService};
use rayon::prelude::*;
use result::{Error, Result};
use service::Service;
use sigverify_stage::VerifiedPackets;
@ -122,7 +121,7 @@ impl BankingStage {
/// an unused `SocketAddr` that could be used to send a response.
fn deserialize_transactions(p: &Packets) -> Vec<Option<(Transaction, SocketAddr)>> {
p.packets
.par_iter()
.iter()
.map(|x| {
deserialize(&x.data[0..x.meta.size])
.map(|req| (req, x.meta.addr()))