To scale the execution of the user reconstruction algorithm we have to split the input.
The most optimal split is Joseph's connected graphs algorithm, that he tested with the page history.
We should adapt the user history code to follow the same structure.
For this, it's good that the code be transformed to purely functional.
And in the end also, we might want to factor out the part of the code that computed the connected components,
so that it can be reused in both page and user history.