It simply fills up a block of size READ_BLOCK_SIZE, inserts it, then start filling another one. I'm not familiar with the output code (tried reading through it, but quickly got confused by the details of the MIME parser). My understanding, though, is that the entire message has to be reassembled in memory at some point for the MIME parsing to work. Ilja, is this correct?
If GMIME has a callback architecture, we might be able to ask it to parse messges in blocks of READ_BLOCK_SIZE, so we'd be able to retrieve rows from the database one at a time and pass it on to GMIME. I'm not sure what the best way to handle this is, though. My thinking has always revolved around handling huge messages without causing resource starvation. So a gigabyte email should be parsed in pieces and not all allocated into memory at once. But a four megabyte email might as well go into memory. You'd have to get a heck of a lot of people each reading a four meg email at once for that to be a major problem. But, since we want DBMail to be properly scalable to really large installations, it is a distinct possibility to have that many people each reading an email that large (scenario: the CEO sounds out his latest crazy plan in a four meg powerpoint, and everyone in the whole company starts pounding on the mail server to retrieve their copy.) Aaron Paul J Stevens <[EMAIL PROTECTED]> said: > Hi all, > > Ilja, Aaron, > > I'm playing around with gmime to see if I can rebuild the message > injection and extraction logic around glib/gmime. > > What I'd like to know: what would be the logic for splitting a message > into messageblks? > > I know the first blk is for the email messageheader. Easy. But after > that? What criteria are used? Line split? fix string sizes? Mimepart > boundaries? I have a hard time understanding the current codebase. > > And are the current criteria implicitely required elsewhere in the code... > > I guess imap-searching requires splitting on line-boundaries at the > minimum, or maybe word-boundaries. > > But other than that? > > > -- > ________________________________________________________________ > Paul Stevens mailto:[EMAIL PROTECTED] > NET FACILITIES GROUP PGP: finger [EMAIL PROTECTED] > The Netherlands________________________________http://www.nfg.nl > _______________________________________________ > Dbmail-dev mailing list > Dbmail-dev@dbmail.org > http://twister.fastxs.net/mailman/listinfo/dbmail-dev > --