my database had 72k annotations at the time I ran these benchmarks, here's the result:
$ python scripts/batch_bench.py conf/development-app.ini dumb
Memory summary: start
types | # objects | total size
=========== | =========== | ============
dict | 13852 | 12.46 MB
frozenset | 349 | 11.85 MB
VM: 327.29Mb
Memory summary: after dumb query
types | # objects | total size
=========== | =========== | ============
dict | 14201 | 15.79 MB
frozenset | 350 | 11.85 MB
VM: 575.88Mb
$ python scripts/batch_bench.py conf/development-app.ini stream
Memory summary: start
types | # objects | total size
=========== | =========== | ============
dict | 13852 | 12.46 MB
frozenset | 349 | 11.85 MB
VM: 327.29Mb
Memory summary: after streaming
types | # objects | total size
=========== | =========== | ============
dict | 14201 | 15.79 MB
frozenset | 350 | 11.85 MB
VM: 495.90Mb
$ python scripts/batch_bench.py conf/development-app.ini yield_per
Memory summary: start
types | # objects | total size
=========== | =========== | ============
dict | 13852 | 12.46 MB
frozenset | 349 | 11.85 MB
VM: 327.29Mb
Memory summary: after yield_per
types | # objects | total size
=========== | =========== | ============
dict | 14198 | 12.81 MB
frozenset | 350 | 11.85 MB
VM: 326.30Mb