performance diagnostics hooks + BufferCopy fix #2137