[Twisted-Python] Large Transfers

Glyph Lefkowitz glyph at twistedmatrix.com
Sat May 10 16:32:21 MDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday, May 10, 2003, at 12:50 PM, Bernhard Herzog wrote:

> I'm not sure what's this supposed to mean. If I try to send [0] * 
> 1000000
> via PB I do get an error because of the size limit, while
> [[0] * 1000 for i in range(1000)] works (at least with the Python
> implementation, I didn't try cBanana). Is one of them handled 
> completely
> at the banana-level and the other isn't?

Right now, you're right that these limits are fairly arbitrary.  
However, it would be a waste of time to explain why they're all 
implemented this way and where the responsibilities lie, because the 
current code is somewhat grotty and is due for a rewrite RSN.  (Don't 
worry - both protocol-level and API-level compatibility should be 
preserved, though newer peers speaking to older peers will be somewhat 
less efficient than new peers talking to new peers.)

Future size limits will be a little fuzzier and more targetted at 
resource consumption rather than data-size limits.

The short answer, though, why this is done this way: once something is 
out of the Banana level you can have a Python policy for limiting it.  
In the banana code, there's not much you can do efficiently, so the 
only size limitations are a length check.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (Darwin)

iD8DBQE+vX35vVGR4uSOE2wRAt/6AKCyOnStZ7e8I5Xjwk0u8wIno66/dwCfUOqY
IuSrmQLm+WfEyxgwxV2H16A=
=DAxz
-----END PGP SIGNATURE-----





More information about the Twisted-Python mailing list