[ZODB-Dev] Sharing (persisted) strings between threads

2010-12-08 Thread Malthe Borch
Currently, when a thread loads a non-ghost into its object cache, its straight from being unpickled. That means that if two threads load the exact same object, any (immutable) string contained in the object state will be allocated for in duplicate (or in general, on the count of the active

Re: [ZODB-Dev] Sharing (persisted) strings between threads

2010-12-08 Thread Malthe Borch
On 8 December 2010 13:28, Jim Fulton j...@zope.com wrote: With 20 active threads, each having rendered the Plone 4 front page, this approach reduced the memory usage with 70 MB. Out of a total of what? In my case out of 430 MB non-shared for the process. Note that if a process is CPU bound

Re: [ZODB-Dev] Sharing (persisted) strings between threads

2010-12-08 Thread Malthe Borch
On 8 December 2010 15:29, Jim Fulton j...@zope.com wrote: The hash table retains a reference to the strings in it.  The references aren't weak afaik. The reference is removed by the custom string dealloc function when the ref count falls to 0. Interned strings do not linger on. What are you

Re: [ZODB-Dev] How to check for setting the same values on persistent objects?

2011-05-04 Thread Malthe Borch
On 4 May 2011 11:53, Hanno Schlichting ha...@hannosch.eu wrote: I tried to analyze the overhead of changing content in Plone a bit. It turns out we write back a lot of persistent objects to the database, even tough the actual values of these objects haven't changed. How about identifying the

[ZODB-Dev] Using demostorage + blobs with ZEO

2011-10-17 Thread Malthe Borch
Hello, According to source code comments, a demo storage will support blobs if the underlying storage does. But I find that it's impossible to wrap a zeoclient in a demo storage and have it working. Am I doing something wrong – or, if it's not supported, would it be difficult to do so and is

Re: [ZODB-Dev] Using demostorage + blobs with ZEO

2011-10-20 Thread Malthe Borch
On 17 October 2011 14:15, Zvezdan Petkovic zvez...@zope.com wrote: It is supported. Great! 1. Wrap zeoclient into before storage. 2. Add filestorage for changes. 3. Wrap all that into demostorage ... but I simply can't see how I can *add* filestorage for changes. Here's my hierarchy:

Re: [ZODB-Dev] Using demostorage + blobs with ZEO

2011-10-20 Thread Malthe Borch
On 17 October 2011 14:15, Zvezdan Petkovic zvez...@zope.com wrote: 2. Add filestorage for changes. Just saw: http://pypi.python.org/pypi/zc.demostorage2/0.1.3. That was the missing piece of information. \malthe ___ For more information about ZODB,

Re: [ZODB-Dev] [ZEO] remote connection problem with ZEO

2011-10-21 Thread Malthe Borch
On 21 October 2011 04:15, 刘一新 liuy...@gmail.com wrote: (1) Why can't I connect zeo on other nodes by just using the hostname:port when zeo is started with -a localhost:1234, and It binds only the loopback device (127.0.0.1). Try setting it up with 0.0.0.0 – this will bind the server to all

Re: [ZODB-Dev] Question about zeo client cache

2011-12-11 Thread Malthe Borch
On 10 December 2011 23:41, Maurits van Rees m.van.r...@zestsoftware.nl wrote: Disk size is cheap.  I suggest increasing this to a few hundred MB or maybe even a few GB if you have lots of data.  Otherwise you will get a lot of traffic between your zeoclient and server. If you have very low

Re: [ZODB-Dev] [Zope-DB] How to extract users info from ZODB?

2012-01-25 Thread Malthe Borch
On 25 January 2012 11:14, smita kamdar smita.kamda...@gmail.com wrote: You mean to say, i click 'acl_users' then click export? That might work you as well – but if you've got something like a pluggable authentication storage, then there's any number of plugins inside your acl_users folder. You

Re: [ZODB-Dev] Solved!!! Re: unable to import ZODB: class ConflictError, AttributeError

2012-06-14 Thread Malthe Borch
On 14 June 2012 17:52, Martijn Pieters m...@zopatista.com wrote: * Store as a tree of persistent objects if parts need changing over time. Future commits would be a lot smaller that way. I'd parse out the original large dictionary in a separate process, perhaps chunk the commits (so build up

Re: [ZODB-Dev] Is any function called when an object is loaded from the database?

2012-06-19 Thread Malthe Borch
On 19 June 2012 19:54, Claudiu Saftoiu csaft...@gmail.com wrote: That is, a function called whenever the object is loaded, that does all the necessary backwards-compatibility work right there. It separates the backwards-compat code cleanly, and also only updates the objects as-needed...

Re: [ZODB-Dev] Is any function called when an object is loaded from the database?

2012-06-19 Thread Malthe Borch
On 19 June 2012 23:38, Claudiu Saftoiu csaft...@gmail.com wrote: Is there any hook to call *after* the instance attributes get set/loaded from the database? True. I guess you'll have to go with Marius' suggestion – ``__setstate__``. \malthe ___ For

Re: [ZODB-Dev] Broken objects problem.

2012-08-08 Thread Malthe Borch
Hey Matias, Make sure that all of the processes have a Python interpreter with access to the relevant modules. You'll get broken objects on the ZEO side if it does not have the same software as your clients. \malthe On 8 August 2012 01:46, Matias Pansa matiashpa...@gmail.com wrote: Hello

Re: [ZODB-Dev] shared cache when no write?

2012-12-13 Thread Malthe Borch
On 13 December 2012 00:31, Dylan Jay d...@pretaweb.com wrote: What if two or more threads could share a zodb cache up until the point at which one wants to write. This is the point at which you can't share a cache in a consistent manner in my understanding. At that point the transaction

Re: [ZODB-Dev] Fwd: Zope/Plone/Zeo Concurrency Issue

2013-05-29 Thread Malthe Borch
. ___ 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 -- Au revoir, et tous mes voeux pour un avenir plein de succès et de bonheur –– Malthe Borch mbo...@gmail.com

Re: [ZODB-Dev] Ackward PersistentList read Performance

2013-08-13 Thread Malthe Borch
On 13 August 2013 15:40, Joerg Baach li...@baach.de wrote: So, can it really be that using a PersistentList is 300 times slower? Am I doing something completely wrong, or am I missing something? In your test setup, you commit the transaction and close the connection. This means that when you