Improve code so I can fetch tens of thousands of email envelopes within seconds #auto