Dirk wrote:


I think we should be able to simply keep a running sum of the content-length as we output each line. I can't think of any way around computing MD5 sums aside from a temp file, but have we determined that it's really necessary to compute those? It just seems a bit of a shame to slow everything down with a tempfile, although with all the other disk access already it probably won't be too much of an incremental change...

In theory this is correct, but ... you have to output the "Content-length" before the content, so you have the following possibilities

* stream content into memory, compute the length, output the length and then the content from memory * stream content into memory, compute the length, drop the content, output the length and then read/write everything again
* use an external tmp file ;-)

I don't know, whether this "big file" issue is really a problem for "native-encoded", non binary files. So probably the first option is a practicable way.

True, that is quite the catch-22. But as soon as we implement the first option, someone will come along with a repository full of 500MB text files. :) Sounds like going the tmp file route is probably the sanest, and it will also allow MD5 creation (although I think that should be an option which defaults to off, since I'm guessing it would slow everything down quite a bit).

toby

_______________________________________________
vss2svn-users mailing list
Project homepage:
http://www.pumacode.org/projects/vss2svn/
Subscribe/Unsubscribe/Admin:
http://lists.pumacode.org/mailman/listinfo/vss2svn-users-lists.pumacode.org
Mailing list web interface (with searchable archives):
http://dir.gmane.org/gmane.comp.version-control.subversion.vss2svn.user

Reply via email to