Hello Hanno, Seems that that was an adapter heavy app. Was before the cut:
len(getGlobalSiteManager()._utility_registrations) 980 len(getGlobalSiteManager()._adapter_registrations) 1432 len(getGlobalSiteManager()._handler_registrations) 63 len(getGlobalSiteManager()._subscription_registrations) 50
After the cut:
len(getGlobalSiteManager()._utility_registrations) 739 len(getGlobalSiteManager()._adapter_registrations) 933 len(getGlobalSiteManager()._handler_registrations) 37 len(getGlobalSiteManager()._subscription_registrations) 33
So around 1/3 of the registrations was gone and that made a difference (well, with z3c.form generated forms). Would be interesting to profile how many adapter lookups are done by a simple z3c.form to render... Saturday, November 28, 2009, 2:32:50 PM, you wrote: HS> On Sat, Nov 28, 2009 at 12:14 PM, Martijn Faassen HS> <faassen@startifact.com> wrote:
Adam GROSZER wrote:
I had a feeling that adapter lookup can be alone slowish with lots of registrations. We had a large project that was cut in half and the z3c.form UI, which is rather heavily adaptation based got a boost after that.
HS> What is a "large project" in your case? Just as an example here's the HS> "size" of the global registry in a typical Plone project:
getGlobalSiteManager() HS> <BaseGlobalComponents base> len(getGlobalSiteManager()._utility_registrations) HS> 1091 len(getGlobalSiteManager()._adapter_registrations) HS> 1283 len(getGlobalSiteManager()._handler_registrations) HS> 139 len(getGlobalSiteManager()._subscription_registrations) HS> 3
Interesting. It'd be interesting to do some experiments with this. Could you perhaps look into writing some kind of stress-test script?
HS> I haven't done any real performance measurements but the various HS> zope.interface/component API's are among the top of every profile run HS> I do in Plone. HS> To me it looks like checking if an interface is provided by a context HS> is non-trivial and the main bottleneck in our case. The classes HS> underlying our typical contexts are pretty fat classes with a long HS> inheritance chain contributing dozens of interfaces. HS> The actual registry lookups seem to be rather fast, they should be HS> essentially dict lookups, which perform well with a dict size of just HS> about 1000. HS> On the other hand I noticed that z3c.form and it's use of the ZCA is HS> indeed much slower than stitching forms together via ZPT macros as HS> done for example by Archetypes. HS> Hanno HS> _______________________________________________ HS> Zope-Dev maillist - Zope-Dev@zope.org HS> https://mail.zope.org/mailman/listinfo/zope-dev HS> ** No cross posts or HTML encoding! ** HS> (Related lists - HS> https://mail.zope.org/mailman/listinfo/zope-announce HS> https://mail.zope.org/mailman/listinfo/zope ) -- Best regards, Adam GROSZER mailto:agroszer@gmail.com -- Quote of the day: The only way to amuse some people is to slip and fall on an icy pavement.