crates/loro-internal/docs/diff_calc.md
Diff calculation is the core of the diff command. It is responsible for calculating the difference between two versions of a container.
This is the most general mode of diff calculation. It can be used whenever a user want to switch to a different version.
But it is also the slowest mode. It relies on the ContainerHistoryCache, which is expensive to build and maintain in memory.
This mode is used when the user imports new updates. It is faster than the checkout mode, but it is still slower than the linear mode.
DiffCalculator doesn't need to rely on ContainerHistoryCache, except for the Tree container.This mode is used when we don't need to build CRDTs to calculate the difference. It is the fastest mode.