[Twisted-Python] Addition to twisted.python.logfile
radix at twistedmatrix.com
Sun Oct 20 21:11:47 EDT 2002
On Mon, Oct 21, 2002 at 10:13:05AM +1000, Donovan Baarda wrote:
> On Sun, Oct 20, 2002 at 02:53:54PM -0500, Glyph Lefkowitz wrote:
> > On Sun, 20 Oct 2002 21:59:52 +0300, Tommi Virtanen <tv at twistedmatrix.com> wrote:
> > > EW! A compression of a file has _nothing_ shared with the
> > > main execution context. A thread is just _so_ much the
> > > wrong tool.
> > As with many potentially icky things in Twisted, this is for portability... I'd
> > rather have it done once in a thread than done twice: once in a thread (for
> > Windows/Java) and once in a Process (for UNIX).
> Compression of a whole file might take too long for twisted to do in it's
> event loop, but an incremental compression using the python zlib module
> wouldn't... just compress a block at a time and use the twisted event loop.
> This saves spawning a thread or process.
Hey, I forgot zlib could do that. That's really cool (And I'd
recommend doing it that way, barring any issues with it (and "it's not
UNIXy" isn't an issue, afaic ;))).
More information about the Twisted-Python