I'm hoping to redo the internal details of a
adapter registries in the next release cycle, along the lines of
work done in the jim-adapter-redesign branch.  This redesign has
the following goals:

- Bring the adapter-lookup algorithm closer to the somewhat familiar
  method-lookup algorithm for Python new-style classes.  Of course,
  this is extended (in an ovious way) to deal with multiple dispatch.

  This new algorithm should give the same results as the current
  mechanism.  In fact, I delayed working on the multi-adapter fix,
  hoping that I would achiev the same result with the new lookup

- Provide an equivalent to super for adapter lookup.  If an adapter
  overrides another adapter, it should be possible for the overriding
  adapter to find and use the adapter it overrides.

- Provide greater performance.

I had originally hoped to achive the last goal without use of any
caching. (The current algorithim is based on very extensive caching.)
Alas, without caching the new algorthm is too slow, and much slower
than the existing alsgorthm.  I am hopeful that with a much simpler and
less expensive cache in front of the new algorthm, I'll be able to meet
current performance for single-adapter lookup and greatly improve
performance for multi-adapter lookup.   I expect to be able to report
results in January.

Obviously, this refactoring will render obsolete tools writted
against the current implementation.


Jim Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org
Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to