> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Sanghyeon Seo > Sent: Thursday, 28 February 2008 5:51 PM > To: [email protected] > Subject: Re: [Ironruby-core] digest.so implemented > > This implementation appends all strings hashed to the buffer. > Which means, if you hash 100 MB file, each megabyte > incrementally, 100 MB MutableString is allocated. This is > unnecessary, and can be avoided by using TransformBlock.
Hi Seo, Thanks for raising this. I was aware of the performance issue and my original implementation did use the TransformBlock method, but I switched to an explicit buffer approach in order to support cloning of digest objects. I didn't think/realize it was possible to clone .NET Crypto objects. I see you use the MemberwiseClone method. Firstly, I thought this was a protected member, how are you able to directly call it on your context objects? Secondly, is the shallow copy that MemberwiseClone performs going to give us the correct cloning semantics? P.S. I notice your module is implemented in Python - I hadn't even contemplated the idea of implementing these libraries in Ruby - I guess because I'm a C# developer. Do people think we should rewrite these extension libraries in Ruby? Cheers, Wayne. _______________________________________________ Ironruby-core mailing list [email protected] http://rubyforge.org/mailman/listinfo/ironruby-core
