Hello David,

> Does anyone know the process by which objects are notified by  
> events?  I created a custom container that stores objects in MySQL.   
> However, I noticed that when I add a container that an  
> ObjectAddedEvent is then propogated to every single object in my  
> container, generating nearly 2000 queries.  From my reading of the  
> core Zope code, it seems that when an event is triggered it is sent  
> to every single object in every container.  This seems rather  
> inefficient if you have either a large container or large objects in  
> your container.  Am I understanding this correctly?   None of my  
> objects subscribe to events (at least not yet).

I was reading about this stuff (source code) last night.  
Perhaps this might help.  The file location is, of course,
system dependent.



"class IWriteContainer(Interface):
    """An interface for the write aspects of a container."""

    def __setitem__(name, object):
        """Add the given `object` to the container under the given name.


        If the object's `__parent__` and `__name__` were already set to
        the container and the name, then no events are generated and
        no hooks.  This allows advanced clients to take over event


Zope3-users mailing list

Reply via email to