wbolster / plyvel

Plyvel, a fast and feature-rich Python interface to LevelDB
https://plyvel.readthedocs.io/
Other
530 stars 75 forks source link

Plyvel runs out of memory very quickly on Python 3.3 #36

Closed wbolster closed 10 years ago

wbolster commented 10 years ago

See https://github.com/wbolster/plyvel/issues/35#issuecomment-53431047 for a bit more details.

wbolster commented 10 years ago

...and python3.2 and python3.4

wbolster commented 10 years ago

Nevermind, this was an error in a hacky test script I used, which called bytes() passing an integer value while building a big WriteBatch. In Python 2 this works:

$ python2 -c 'print(bytes(10))'
10

In Python 3 this would add huge strings, causing out of memory errors quite easily:

$ python3 -c 'print(bytes(10))'
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'