I'm looking for ways to speed up the process of retrieving emails you already have the folder / UID for.
Currently (through my own profiling) the Select takes by far the longest (something like 1-2 second to select an 'All Mail' folder within a gmail account with 100,000 emails).
I'm caching as much as I can (the UIDs themselves are cached, the folder list, etc).
I want to understand more about what's happening during the Select folder process. Secondarily if there is a way to improve performance of the connection itself (aside from keeping them in memory - this is not an option given the number of instances this code is running on).
Thanks.