If you use Gmail over IMAP, then you want to know about a new feature Google just released as part of Gmail Labs. It lets you make the "All Mail" folder invisible to IMAP so that your email client doesn't try to download every message twice.
Gmail is different from other IMAP implementations in that each "folder" corresponds to a Gmail "label". Because each message can have more than label in Gmail, each message can appear in more than one folder in IMAP. Gmail also has an "All Mail" view that shows all of the messages at once - the Inbox, Sent, Archived, Labels, etc. This is handy when you're in Gmail and want to search across everything, but its not really needed in an IMAP client because most IMAP clients do their own indexing of messages and make it easy to search across all of them without having them in a folder.
The problem with the All Mail folder over IMAP is that it means you're downloading every message twice. And because your IMAP client thinks that a message that appears in 2 different folders is actually 2 different messages, any local searches that you do will return 2 results for every message - once in the folder you expect and once in the All Mail folder.
I have a lot of email - its measured in gigabytes - and so keeping around 2 copies of every messages is a pretty big deal. It takes up a lot of disk space, slows down my Internet because its downloading 2x as much, slows down my computer because my email program needs more memory to run. I highly recommend you turn off your All Mail folder!
To do this, go to Settings -> Labs and then turn on the Advanced IMAP feature. Next go to Settings -> Labels and uncheck All Mail. It's that simple!

p.s. hat tip to Ian Ragsdale for pointing this out to me after I complained about it screwing up my IMAP client!
Nice post.Thank you for taking the time to publish this information very useful!
Posted by: moncler down | October 27, 2011 at 04:39 AM
Hey Josh .. we all grocked onto it here and never gave you any feedback. Thanks!
Posted by: David Goodman | November 17, 2008 at 05:49 PM
Wow, that's great, I've been having the same troubles. Turning this on right now.
Posted by: Mike Subelsky | October 14, 2008 at 08:48 PM
Great post! Many thanks for the time this will save me. BTW, for those that are using Google Apps, you might need to first enable the "Turn on new features" feature for your domain. See http://www.google.com/support/a/bin/answer.py?hl=en&answer=82691 for more info.
Cheers!
Eric
Posted by: Eric Goh | October 14, 2008 at 07:39 PM