HomeSoftware Heritage

cassandra: Make content_missing run in linear time instead of quadratic
40a57d435155Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

cassandra: Make content_missing run in linear time instead of quadratic

Assuming all contents passed to content_missing() have (at least) a missing algo,
the function used to iterate over the size of the arg squared
in the worst case (when all contents are found).

With this commit, it starts with bucketing them by hash, so it does not
need to iterate over *all* found contents for each content passed as arg.

Event Timeline