[Zope-CMF] Re: [Zope-dev] TypesTool speedup

2007-03-05 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Alec Mitchell wrote:
 Looking at the changes rocky made, I don't see why allowing external
 methods from non-Products should require making the whole process
 completely dynamic on every call.  The old mechanism of storing the
 product list should be put back in place, along with the addition of
 non-Product information to these results.

Not to mention that the *idea* of having ExternalMethods loaded from
non-products is completely silly:  it the package is written to function
as a Zope2 product (and I defy anybody to offer an example of a
non-Zope2-specific package with an 'Extensions' directory!), then make
it a product, dangit.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF7AiH+gerLs4ltQ4RAqyBAJ4yMkUo+japLU1tTrWvDcq7skr+cgCg2Vci
3YMGrdESMpqCe8EXwxKIsFA=
=DEeK
-END PGP SIGNATURE-

___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


[Zope-CMF] Re: [Zope-dev] TypesTool speedup

2007-03-04 Thread Wichert Akkerman
Previously Andreas Jung wrote:
 --On 4. März 2007 13:57:23 +0100 Wichert Akkerman [EMAIL PROTECTED] 
 wrote:
 
 I'm forwarding a message from limi here, since it makes much more sense
 here than it does on plone-developers. To summarize it: while analying
 performance of the Plone 3 codebase they noticed a lot of time was spent
 trying to figure out which types could be added at a location. Part of
 that logic uses the TypesTool _queryFactoryMethod function, which goes
 through the dispatcher to get to the factory method for a type, which is
 apparently very slow in Zope 2.10, and much faster in Zope 2.9.
 
 
 Any idea why the code is different between 2.9 and 2.10?

Rocky modified it in changeset 67869 to be able to support external
methods outside of products. The problem with the new code is that it
imports all products to figure out some of their details. So for every
factory dispatcher access we now have an import for each product, which
means lots of filesystem accesses and python interpreter work being
done.

 They came up with http://paste.plone.org/13211 which is an imho somewhat
 evil approach which introduces a thread-local cache for
 App.FactoryDispatcher._product_packages. As described below the speedup
 as a result of that is huge.
 
 I would not be opposed against such a speedup patch as long as it does
 not raise other problems. However I don't know App.* enough to be evaluate 
 the patch.

http://paste.plone.org/13217 should do the trick. It makes
_product_packages cache its result using the list of products in
Control_Panel as a cache key. That makes sure that removing or adding
products there will not result in stale data being returned by the
dispatcher.

Wichert.

-- 
Wichert Akkerman [EMAIL PROTECTED]It is simple to make things.
http://www.wiggy.net/   It is hard to make things simple.
___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


[Zope-CMF] Re: [Zope-dev] TypesTool speedup

2007-03-04 Thread Wichert Akkerman
Previously Wichert Akkerman wrote:
 http://paste.plone.org/13217 should do the trick. It makes
 _product_packages cache its result using the list of products in
 Control_Panel as a cache key. That makes sure that removing or adding
 products there will not result in stale data being returned by the
 dispatcher.

Obvious and stupid mistake in that patch, http://paste.plone.org/13218
should be better.

Wichert.

-- 
Wichert Akkerman [EMAIL PROTECTED]It is simple to make things.
http://www.wiggy.net/   It is hard to make things simple.
___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


[Zope-CMF] Re: [Zope-dev] TypesTool speedup

2007-03-04 Thread Sidnei da Silva

Mutable default values are evil. I would get rid of that.
--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


[Zope-CMF] Re: [Zope-dev] TypesTool speedup

2007-03-04 Thread Alec Mitchell

Looking at the changes rocky made, I don't see why allowing external
methods from non-Products should require making the whole process
completely dynamic on every call.  The old mechanism of storing the
product list should be put back in place, along with the addition of
non-Product information to these results.

Alec
___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests