I use SnappyMail (a fork of Rainloop) for my IMAP webmail client.
With IMAP, everything stays on the server, so the client doesn’t have to worry about the inbox size. Searching is also done server-side, so the client just needs to send a query.
The performance will ultimately come down to the performance of your IMAP server.