From: Ian B. <ia...@co...> - 2006-01-26 04:49:28
|
Chuck Esterbrook wrote: > I'm working strictly off memory here, but I thought the point of the > implementation was that it used a special library (when available) > that eliminated the need for polling. Instead, the op sys would notify > the appserver process when a file changed. > > Does that sound familiar? I'm not sure that was actually the original intent, but yes, that is an advantage. OTOH, you could look at sys.modules.keys() once a second to test for new files without any substantial overhead. > Polling has the well known disadvantages of (1) the gap between polls > (too big? too small? never just right), (2) wasted effort checking for > something repeatedly and in this case, (3) the increased amount of > time required per poll as your app grows larger and uses more modules. > > Although, I don't see why we couldn't have an option to use one > technique vs. another. We could even default it to polling sys.modules > since that seems less likely to disturb other Python packages like > Cheetah. Especially since most people don't have the non-polling libraries installed (e.g., famd), this would be safer all around. -- Ian Bicking | ia...@co... | http://blog.ianbicking.org |