[Python-Dev] CPython optimization: storing reference counters outside of objects

Sturla Molden sturla at molden.no
Tue May 24 14:08:14 CEST 2011


Den 24.05.2011 11:55, skrev Artur Siekielski:
>
> PYRO/multiprocessing proxies isn't a comparable solution because of
> ORDERS OF MAGNITUDE worser performance. You compare here direct memory
> access vs serialization/message passing through sockets/pipes.

The bottleneck is likely the serialization, but only if you serialize 
large objects. IPC is always very fast, at least on localhost .

Just out of curiosity, have you considered using a database? Sqlite and 
BSD DB can even be put in shared memory if you want. It sounds like you 
are trying to solve a database problem using os.fork, something which is 
more or less doomed to fail (i.e. you have to replicate all effort put 
into scaling up databases). If a database is too slow, I am rather sure 
you need something else than Python as well.

Sturla


More information about the Python-Dev mailing list