> On which machine? (cpu, mainboard, amount of free RAM, > operating system...) If it's new/rather new machine, such > result is far below expectations - I get 20 sec on old P120 > with 32MB RAM and Win95.
Pentium M 2,13 GHz - 533 MHz FSB, 1 GB ram, WinXP Pro, so I guess the machine should perform good. > > Is there a way > > to make the decoding work faster? I have about the same > testresult on > > the beta and the older version of MimeDec. > > There's many ways to make it faster. First, do not use > TMemoryStream as decoded attachment storage *unless* you set > it's size so TMemoryStream won't need to reallocate his > memory. Second, you should use larger input buffer (not that > 4kbyte one), or change decoding logic so you could use > memory- mapped file. Third, do not use OnPartLine to store > data - set DestStream and leave OnPartLine unassigned (you'll > save one jump into and out of the handler, possibly dirtying > less processor's L1/L2 cache). > Fourth, use TMemoryStream (or some kind of > TBufferedWriteStream) as decoded data storage (but remember > about the first note above). > > Fifth - discard these fancy progressbars (and progressbar > updating code) ;) I use TMemoryStream. I don't use any progressbars, but I use the old version MimeDec. And I don't use MimeDec directly, I use it through MimeDecEx from usermade page, It could be there that I should use the improvements you suggests. If you think it's a bad idea to use the MimeDecEx from usermade page, could you provide a working example of how to use the new beta of MimeDec? Regards Bjørnar -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be