Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve sorting mini-tree results #12

Open
sifnoc opened this issue Dec 13, 2023 · 0 comments
Open

Improve sorting mini-tree results #12

sifnoc opened this issue Dec 13, 2023 · 0 comments

Comments

@sifnoc
Copy link
Member

sifnoc commented Dec 13, 2023

While collecting min-tree from executors, the Orchestrator has a logic that copies and sorts processed task for returning result.
but it’s too time consuming.

let all_tree_results = join_all(all_tree_responses).await;
// Aggregate results from all workers in order
let mut ordered_tree_results = vec![None; self.entry_csvs.len()];
for result in all_tree_results {
let (index, worker_results) = result.unwrap();
let start = index * entries_per_executor;
for (i, res) in worker_results.iter().enumerate() {
ordered_tree_results[start + i] = Some(res.clone());
}
}

We can improve this part use rayon

@sifnoc sifnoc changed the title Improve sorting mini-tree resutls Improve sorting mini-tree results Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant