Hello.
I have user with approximately 500000 emails in his INBOX folder and this is not limit. And there is some inconvenience in viewing this folder. It takes about 5-7 seconds to display list of emails in folder. Pagination is set to 100 emails per page. I checked that IMAP server complete request "FETCH 1:100 ENVELOPE" in 147ms, and "FETCH 1:* ENVELOPE" in 6 second. This is why I begun to think that RoundCube may request for all emails instead of 100. Roundcube is configured for default sort order: descending by receiving date.
Regards, Alexey.