Add stat
to ToCommit
function for speed
#21337
Merged
stat
to ToCommit
function for speed
#21337