[ZODB-Dev] Ackward PersistentList read Performance
Joerg Baach
lists at baach.de
Tue Aug 13 15:40:38 CEST 2013
Hi *,
I was trying to measure the impact of using different kind of objects to
store data in ZODB (disk, ram, time).
Whats really ackward is the measurement for reading content from
PersistentLists (that are stored in an IOBTree):
case a
======
g.edges=IOBTree()
for j in range(1,1000000):
edge =PersistentList([j,1,2,{}])
g.edges[j] = edge
x = list(g.edges.values())
y = [e[3] for e in x] #this takes 30 seconds
case b
======
g.edges=IOBTree()
for j in range(1,1000000):
edge =[j,1,2,{}]
g.edges[j] = edge
x = list(g.edges.values())
y = [e[3] for e in x] #this takes 0.09 seconds
So, can it really be that using a PersistentList is 300 times slower? Am
I doing something completely wrong, or am I missing something?
I am using ZODB3-3.10.5. The whole setup (incl. results) is at
https://github.com/jhb/zodbtime
Cheers,
Joerg
More information about the ZODB-Dev
mailing list