GothenburgBitFactory / taskchampion

Personal task-tracking library
MIT License
70 stars 15 forks source link

Replace working set more efficiently #414

Open djmitche opened 3 weeks ago

djmitche commented 3 weeks ago

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

https://github.com/GothenburgBitFactory/taskchampion/blob/e725a38c991dd32fd5f3b9b2daa4644b7dbbc9d2/taskchampion/src/taskdb/working_set.rs#L38-L42

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.

koleesch commented 2 weeks ago

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

djmitche commented 2 weeks ago

Maybe we can come back to this after #410?