Cache change range span for perf.

This avoids an unnecessary allocation in a hot path.