Performance tweaks.
Merge pull request #652 from doctrine/fix/performance-tweaks

Fix/performance tweaks