I have discovered the following.
db.dbRoot is the root of my database and 'accounts' is a key. I simply
want to set a timestamp for when a user logs in. I make the timestamp
persistent by assigning the database key to a variable and back again as in
the following code.
accounts = db.dbRoot['accounts'][accountKey]
accounts[accountKey]['last-login-time'] = int(time.time())
db.dbRoot['accounts'][accountKey] = accounts
I have discovered that each time this code is executed, it increases the
size of my database by about 800,000 bytes. Even though I suspect that it
writes all of the accounts, the data in all of the accounts is not anywhere
near 800,000. It is about 2k.
I have been googling the ZODB and need to learn. Your answers on this list
are pretty much over my head, but for now could you please tell me how to
save about 50 bytes of information without the additional 799,950?
View this message in context:
Sent from the Zope - ZODB-Dev mailing list archive at Nabble.com.
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org