Speed up hacking_import_alphabetical

Using cProfile to measure cumtime,

Change-Id: Ib4837801841f02d56e5961f6b47e58e831675257
Before: 2.4 seconds
After:  1.2 seconds
Merge "Speed up hacking_import_alphabetical"