Closed Mark-Simulacrum closed 5 years ago
We can probably simplify the code a lot by removing RecentSeen
. A comment in the code hints at storing 100 elements so all the jobs's build IDs in a single build (~60) can be recorded, but that's not needed. Build IDs for all the jobs in a run are the same, and we can safely store at most 8 or 16 of them in the last seen cache. With that low number of entries the lookup cost in a ring buffer is negligible, and that's way simpler code to implement and maintain.
r=me once the Vec
is replaced with the VecDeque
This is probably a bit overboard but there's tests that seem to indicate this works.
r? @pietroalbini