[BREAKING] Improve replacement API performance.