The best course of action would be to sync your imap folders to a local server (OfflineImap with dovecot is an amazing combo). I'm using Google Apps like that, and it's blazingly fast. It does eat a lot of disk space locally aswell, but that's something I can afford for now.