[Zope-dev] Anyone want to do Google Summer of code mentoring for PSF?

Wichert Akkerman wichert at wiggy.net
Mon Mar 21 05:30:38 EDT 2011


On 3/21/11 10:17 , Jan-Wijbrand Kolman wrote:
> On 3/20/11 16:12 PM, Wichert Akkerman wrote:
>>> Pyramid only does so if you tell it to do so by using config.scan(). You
>>> are not obliged to do that, and I have several pyramid projects which do
>>> not do any scanning. Not doing scanning has the advantage of making
>>> configuration more explicit, and it speeds application startup immensely.
>
> Just to get this clear for me: if you're not scanning, the information
> left by the class decorators would be "inert"? So, you'd have to do the
> registrations "yourself", right?

Yes.

>> - you may have some draft files in your tree that are not ready for use
>>      and never referenced anywhere, but a scan will still process them.
>
> This is true.

I ran into this with .html.py files generated by Chameleon as well. My 
Zope startup has lots of these:

/Users/wichert/Library/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py:605: 
UserWarning: File 'sessions.pt.pyc' has an unrecognized extension in 
directory 
'/Users/wichert/Work/syslab/euphorie/Develop/trunk/buildout/src/Euphorie/euphorie/client/templates'


>> - scanning can take a long time, making application (re)start slow for
>>      non-trivial projects
>
> At what point is an application not trivial anymore? In applications I
> build so far, startup time has not been an issue at all. But maybe my
> applications are still on the trivial-end of the spectrum ;)

If your application takes >5 seconds to start I'ld call it non-trivial :)

>> - problems in the scanning process tend to be very hard debug. If a
>>      view is not processed during scanning figuring out why can be
>>      painful, and there are little to no tools to help you. This is
>>      especially true for more complex scanning environments such as the
>>      plone/dexterity/z3cform stack; as an example I spent over an hour
>>      yesterday trying to figure out why a form was not picked up while
>>      other views in the same python file worked fine.
>
> I think this can be true. In my experience not relying on implicitly or
> "guessed configuration parameters helps a little here. What in this
> specific example was the reason for the view not being picked up?

A missing zcml include for meta.zcml of plone.directives.form, while 
it's configure.zcml was included correctly.

Wichert.


More information about the Zope-Dev mailing list