Skip to content

Commit 6e37930

Browse files
authored
Simplify pending work tracking (#1662)
Alan and I were talking in person about pending work tracking in the Downstairs, and I found some room for simplification: - Instead of tracking pending work and number of unmet dependencies in separate hashmaps, put them into a single `struct PendingJob` - Instead of using `HashMap<JobId, IOop>` then cloning + sorting the keys to make a `Vec<JobId>`, just use a `VecDeque` This are relatively small cleanups, but may have a small impact on Downstairs RAM usage. There are two behavior changes, both of which should be innocuous: - We now check whether jobs are ready in the order that they're received, instead of sorting all pending jobs by `JobId` _then_ checking whether they're ready. This is fine, because readiness is determined by dependencies. - The `show_work` debug function no longer sorts job IDs when printing pending work
1 parent 81a3528 commit 6e37930

File tree

1 file changed

+108
-126
lines changed

1 file changed

+108
-126
lines changed

0 commit comments

Comments
 (0)