[Bug 847894] improve typing performance [r=crdlc]
Merge pull request #8470 from EverythingMe/typing-performance

[Bug 847894] improve typing performance [r=crdlc]