Improve performance in contrails
Merge branch 'master' into pre3.2