Use iteritems instead of items. This is enough of a memory hog as is.