[Product-Developers] Beware: plone.reload not pinned

Mikko Ohtamaa mikko+plone at redinnovation.com
Tue Apr 12 21:08:24 UTC 2011


aclark wrote:
> 
> On a related note, anyone interested in trying to implement an 
> auto-reload feature such that code gets reloaded whenever a .py file 
> changes (a la Django)?
> 

http://svn.plone.org/svn/collective/collective.autorestart/trunk/README.txt

Currently Linux only, but should be easy to expand the support with OS
specific file change notify bindings (by the writing no generic Python
solution was available).

Some fork magic must be implemented to make it faster.

1)Load Zope to a point we know it is stable (e.g. zero add-ons loaded)

2) Suspend the process

3) Fork

4) Continue loading add-ons in the child

5) When files change, kill the fork and start from 2 again

This would save us from the initial Zope start-up overhead and I think
Django does something similar.

-----

Follow me in Twitter 



Download mFabrik News for iPhone 
or Android 




--
View this message in context: http://plone.293351.n2.nabble.com/Beware-plone-reload-not-pinned-tp6265328p6266787.html
Sent from the Product Developers mailing list archive at Nabble.com.



More information about the Product-Developers mailing list