Just did this for Iceweasel - Iceweasel/2.0.0.17 (Debian-2.0.0.17-0etch1)
From the article Recommended IMAP client settings at the Gmail Help site:
- In the 'Tools' menu, open Options.
- On the 'Advanced' tab, open the General section.
- Click the Config Editor button.
- In the 'Filter' box, type 'browser.cache.memory.capacity'
- Double-click on the browser.cache.memory.capacity entry to edit its value.
- Change the value to '30720' and click OK.
- Delete the text in the 'Filter' box and type 'mail.server.default.fetch_by_chunks'
- Double-click on the mail.server.default.fetch_by_chunks entry to set its value to false.
- Close the 'about:config' window and then close 'Options' by clicking OK.
[these suggestions are given by Google as performance tweak suggestions to "enhance your IMAP experience" - see the URL(s) given above for the source material and any explanations thereof, i.e. ymmv]