When I was a Mac user, I kept my million-plus-email archive in Apple's Mail.app program, and suffered through incredible delays whenever I tried to open or search my archival mailboxes (for what it's worth, I'm thrilled and delighted with the performance of Thunderbird under Ubuntu Linux).
The Mail.app fan-site Hawk Wings has a great tip for Mail.app users — a simple command that many are swearing by as a means of evincing a gigantic speedup in Mail.app's performance. If you're suffering through the same hell I lived with back in my PowerBook days, you might give it a shot.
Note: I haven't tried this. You might nuke your mail forever. Make backups. Don't say you weren't warned.
1. Quit Mail.
2. Open Terminal.
3. Type the following:
cd ~/Library/Mail
sqlite3 Envelope\ Index
An sqlite> prompt will appear.
At that prompt, type vacuum subjects;
After a short delay, the prompt will return. Type Control-D to exit.
4. Restart Mail and enjoy the extra speed.
Update:
Steve sez, "I have taken the idea of running the sqlite vacuum command on the database for Mail to speed it up and written a script to do the same things to Aperture's database."