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).

The problem seems to start in, which basically queries all objects in a container and sends an event to all of them.
excerpt from

    def sublocations(self):
        container = self.container
        for key in container:
            yield container[key]

Warm regards,

Zope3-users mailing list

Reply via email to