This has been driving me slightly crazy – too much mail and too many mail folders trying to synchronize when I connect to Gmail from Apple Mail. Finally found the solution via the Apple support boards:
Apple – Support – Discussions – Gmail IMAP on Leopard :Activate the Advanced IMAP controls in Google Labs and then don’t have “All Mail” downloaded to your computer (via Labels under Settings). You’ll have the different folders at least, but maybe this will help?
So, what you need to do is go to Gmail, under settings, go to the Google Labs tab and activate “Advanced IMAP Controls.” Then, still in Gmail, go to your settings, go to Labels, and then turn off some of the folders for IMAP. Things got a bit speedier.
It would really be nice to be able to limit how much mail comes down, or to block anything I’ve ‘archived’ from showing, but I’ll take this for now.