Performance improvements

`Director::getMatrix()` returns `const Mat4`
Merge pull request #9011 from ricardoquesada/perf_fixes

Performance improvements