Cache the result of Diff.evolution() for repeated calls.
Review Request #11250 — Created Oct. 26, 2020 and submitted — Latest diff uploaded
Diff.evolution()
is a fairly expensive operation that can get called
multiple times. It performs a diff of two signatures, generating a list
of mutations to transform one into the other.This change caches the result of that so multiple calls won't require
the work to be repeated. After the initial generation, any future calls
are effectively free.
Unit tests pass.
Manually verified that repeated calls were getting the correct results
and not triggering a rebuild.