Some performance fix
Merge remote-tracking branch 'origin/3.0-master' into 3.0-master