When viewing an email with a large amount of data, that data has to be retrieved from the IMAP server, then parsed, and decoded.
If your IMAP server is not local to your RoundCube app, ot there are some sort of local network restriction in affect, or your IMAP server is half way around the world, then retrieving the email will cause your browser to timeout before the message is finished downloading / parsing / decoding.
The workaround that I'm looking at, if there is a decode problem in terms of performance, is writing a C app that will handle this.
Oh the joys of email.