speedup matrix generator
Merge branch 'develop' into 1.x-stable