Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

155 result vec #227

Closed
wants to merge 3 commits into from
Closed

155 result vec #227

wants to merge 3 commits into from

Conversation

rlkelly
Copy link
Contributor

@rlkelly rlkelly commented May 16, 2018

I was going through some of the cleanup issues, was this the general idea of what you were looking for? It filter_maps so you don't have to iterate later

@garious
Copy link
Contributor

garious commented May 16, 2018

Unfortunately, no. That PR has two issues, first the loss of error information from that early filter_map, and second, we actually want to go the other extreme and propagate Vec<Result<T>> through the entire stage so that we never need to malloc.

@rlkelly
Copy link
Contributor Author

rlkelly commented May 16, 2018

Ok, so still exploring how to improve this pipeline. I'm not 100% sure how to prevent malloc's in Rust.

My thought was filtering earlier because we see here: https://github.com/rlkelly/solana/blob/db019421ae44e109e560856c413f4c9ea2fd732f/src/bank.rs#L272
that this are just filtered and will return an error at process_verified_entries so would failing earlier be better?

@garious
Copy link
Contributor

garious commented May 16, 2018

The bottleneck is very likely BankingStage::process_packets(). We'll need to benchmark it (which is a little tricky) and then either optimize it or make the stage shorter by moving serialization and/or deserialization to separate stages. I have some time in a couple hours to whip up that benchmark. Kudos if you beat me to it!

@garious
Copy link
Contributor

garious commented May 16, 2018

Hint: see to_request_packets. That type signature should be "T: Serialize", not Request. If you had that, the benchmark should be a breeze to write.

@garious garious closed this May 19, 2018
vkomenda pushed a commit to vkomenda/solana that referenced this pull request Aug 29, 2021
apfitzge referenced this pull request in apfitzge/agave Mar 13, 2024
…client()` (anza-xyz#227)

update changelog and remove deprecated label on get_client
willhickey pushed a commit that referenced this pull request Mar 16, 2024
…client()` (#227)

update changelog and remove deprecated label on get_client
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants