Various performance improvements.

Change-Id: I0cc89cab519c1602b16cebdc3f6b9b5201eca6ca
7 files changed