On Tuesday 15 January 2008, Chris Withers wrote:
> For what I'm after, I need to have a more dynamic buildup of
> registrations based on which objects have been traversed through.

Right. I think the component architecture is not really made for this. I think 
it would be easier to turn on/off registrations by using dynamically directly 
provided interfaces (via a proxy) or use security. It would help me, if you 
could describe your actual use case.

> I can see two ways to approach this:
> - stack the registries up during travesal in some way. I guess this
>    would be a variant of what's done now with current nested registries.
>    Is this feasible? Will there be performance problems?

I think the performance would decrease, because caches cannot be built up. 
Also, you then must be able to access this custom registry. Remember, this 
must be all in memory, because of thread-safety!

> - use one global registry and add/remove registrations during traversal
> as necessary. How fast is registration/unregistration of adapters and
> the like? How many adapter adds/removes at a traversal node would it
> take to really slow things down?

You cannot do this; it is not thread-safe.

Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to