It sounds like Squirrelmail 1.5.x may finally be only pulling the headers for a single "page" of index data? If so, I need to investigate it.. :-)
Given the GUI nature of RC, I'm not sure how practical that is. Unless you allow scrolling right away, perhaps with dummy data, and dynamically fetch the entries you need to show for the current page, as you scroll to them; and used some kind of persistent connection from the client to the server, to avoid bashing the imap server.
I don't know how either are polling the database, but shouldn't RoundCube only be querying a maximum of the "rows per page" setting under Personal Settings each time you navigate to or in a folder? I hate to think it is retrieving thousands of messages and then only showing me 40 each time I touch something...
... and they use a persistent connection (but that's cheating, since they aren't a web app).
You can have a partially-persistent imap connection if imapproxy is used on the backend, or are you talking Apache's not-persistence?
List info: http://lists.roundcube.net/users/