Investigate ways to improve the performance of IdentityMap which consistently shows up as a hotspot in profiling.