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

_______________________________________________
For more information about ZODB, see http://zodb.org/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to