Created
February 24, 2014 01:06
-
-
Save tseaver/9179994 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ZODB import DB | |
from BTrees.IIBTree import IIBTree | |
import transaction | |
def populate_tree(): | |
db = DB('fuckme.fs') | |
connection = db.open() | |
root = connection.root() | |
tree = root['tree'] = IIBTree() | |
for i in xrange(1000000): | |
tree[i] = 1 | |
transaction.commit() | |
connection.cacheMinimize() | |
return tree | |
def main(): | |
tree = populate_tree() | |
print('done') | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment