-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/02/2011 06:17 PM, Nikolay Kim wrote:
> well, we tested on modern windows, everything seem to work.
> but problem is, it is not possible to develop on windows without this
> patch. it just too slow. removing 'os.path.walk' makes development mode
> as fast as on linux
> 
> 
> On Wed, 2011-02-02 at 18:12 -0500, Tres Seaver wrote:
> On 02/02/2011 05:30 PM, Nikolay Kim wrote:
> 
>>>> Modified: Products.CMFCore/trunk/Products/CMFCore/DirectoryView.py
>>>> ===================================================================
>>>> --- Products.CMFCore/trunk/Products/CMFCore/DirectoryView.py       
>>>> 2011-02-02 22:30:34 UTC (rev 120067)
>>>> +++ Products.CMFCore/trunk/Products/CMFCore/DirectoryView.py       
>>>> 2011-02-02 22:30:48 UTC (rev 120068)
>>>> @@ -106,7 +106,6 @@
>>>>  class DirectoryInformation:
>>>>      data = None
>>>>      _v_last_read = 0
>>>> -    _v_last_filelist = [] # Only used on Win32
>>>>  
>>>>      def __init__(self, filepath, reg_key, ignore=ignore):
>>>>          self._filepath = filepath
>>>> @@ -159,23 +158,13 @@
>>>>          if not Globals.DevelopmentMode:
>>>>              return 0
>>>>          mtime=0
>>>> -        filelist=[]
>>>>          try:
>>>>              mtime = os.stat(self._filepath)[8]
>>>> -            if platform == 'win32':
>>>> -                # some Windows directories don't change mtime
>>>> -                # when a file is added to or deleted from them :-(
>>>> -                # So keep a list of files as well, and see if that
>>>> -                # changes
>>>> -                os.path.walk(self._filepath, self._walker, filelist)
>>>> -                filelist.sort()
>>>>          except:
>>>>              logger.exception("Error checking for directory modification")
>>>>  
>>>> -        if mtime != self._v_last_read or filelist != 
>>>> self._v_last_filelist:
>>>> +        if mtime != self._v_last_read:
>>>>              self._v_last_read = mtime
>>>> -            self._v_last_filelist = filelist
>>>> -
>>>>              return 1
>>>>  
>>>>          return 0
> 
> Nikolay,
> 
> The code you removed was there to prevent very real problems some people
> experienced when running on Windows in development mode:  are you sure
> that such users have all moved on to modern enough versions to make this
> change a better tradeoff?
> 
> Maybe we should allow restoring the "safe but slow" behavior with an
> environment variable?

(Sorry for the confusion about ths list -- my earlier message went to
Nikolay directly, but to the zope-cmf list via gmane).

Can anybody else comment who is doing CMF-based work on Windows?


Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tsea...@palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1J7bgACgkQ+gerLs4ltQ6KXQCdGNoujM2AjD7dsmItPHvNNGKE
x6gAoNIhP49Cz3ecIQiSEpizoPk0cHLy
=skx6
-----END PGP SIGNATURE-----
_______________________________________________
Zope-CMF maillist  -  Zope-CMF@zope.org
https://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to