Lps 51900

This is a performance improvement for SP9 release.

@zsoltbalogh , You don't really need to take the last 2 commits for backport(You can, just don't have to)