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

Replace working set more efficiently #414

Open
djmitche opened this issue Jul 7, 2024 · 2 comments
Open

Replace working set more efficiently #414

djmitche opened this issue Jul 7, 2024 · 2 comments
Labels
good first issue Good for newcomers

Comments

@djmitche
Copy link
Collaborator

djmitche commented Jul 7, 2024

When renumbering tasks, we delete and re-add the entire working set:

if renumber {
txn.clear_working_set()?;
for elt in new_ws.drain(1..new_ws.len()).flatten() {
txn.add_to_working_set(elt)?;
}

This is pretty slow, and in most cases only a few tasks will change numbers. Optimize for that case, by only updating the items that have changed. This should allow removing the Storage::clear_working_set method as well.

@djmitche djmitche added the good first issue Good for newcomers label Jul 7, 2024
@koleesch
Copy link
Contributor

koleesch commented Jul 8, 2024

I would like to do it, but i don't understand the datastructures. So I need help for it.

@djmitche
Copy link
Collaborator Author

djmitche commented Jul 9, 2024

Maybe we can come back to this after #410?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Backlog
Development

No branches or pull requests

2 participants