[Zope] rename lots of files

Dylan Reinhardt zope@dylanreinhardt.com
28 Apr 2003 11:49:31 -0700


If the return value of the script is the manage_main view of the folder
containing the script, you'll see something like a 98% speed-up if you
run this script from a different folder than the one the objects are
actually in.  

When you're doing a large-scale operation on a folder that contains
hundreds of objects (or more), the resources required to redraw the ZMI
are surprisingly immense.  I suspect there may be other issues at play
here as well, though I haven't read far enough into the code to know.

FWIW,

Dylan


On Mon, 2003-04-28 at 03:46, Roel Van den Bergh wrote:
> Hi all.
> 
> We are trying to rename a lot of files in the same folder, but everytime we
> try this , there is no result. It takes ages before the page is reloaded and
> the only thing we see is a "server time-out", no error-page at all and
> nothing changes. We use unique names so entering twice the same name is not
> done.
> 
> The debug page shows us:
> 
> ({'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'CONTENT_TYPE':
> 'application/x-www-form-urlencoded', 'PATH_TRANSLATED':
> '/VirtualHostBase/http/www.planetinterior.be:80/VirtualHostRoot/Normbook/por
> tal_skins/custom/NormBook_T', 'HTTP_ACCEPT': '*/*', 'GATEWAY_INTERFACE':
> 'CGI/1.1', 'HTTP_X_FORWARDED_HOST': 'www.planetinterior.be',
> 'HTTP_ACCEPT_LANGUAGE': 'nl-be', 'HTTP_X_FORWARDED_FOR': '194.78.205.110',
> 'REMOTE_ADDR': '127.0.0.1', 'SERVER_PORT': '8080', 'HTTP_USER_AGENT':
> 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)', 'CONTENT_LENGTH':
> '28519', 'channel.creation_time': 1051528661, 'SERVER_PROTOCOL': 'HTTP/1.1',
> 'PATH_INFO':
> '/VirtualHostBase/http/www.planetinterior.be:80/VirtualHostRoot/Normbook/por
> tal_skins/custom/NormBook_T', 'HTTP_HOST': '127.0.0.1:8080',
> 'REQUEST_METHOD': 'POST', 'SCRIPT_NAME': '', 'SERVER_SOFTWARE': 'Zope/(Zope
> 2.5.1 (source release, python 2.1, linux2), python 2.1.3, linux2)
> ZServer/1.1b1', 'HTTP_CACHE_CONTROL': 'no-cache', 'CONNECTION_TYPE':
> 'close', 'HTTP_COOKIE': 'show_filter_form="1"; dtpref_cols="50";
> dtpref_rows="20"; tree-s="eJzTiFZ3hANPW/VYHU0ALlYElA"',
> 'HTTP_X_FORWARDED_SERVER': 'www.planetinterior.be', 'SERVER_NAME':
> 'piwebserver.planetinterior.be', 'HTTP_REFERER':
> 'http://www.planetinterior.be/Normbook/portal_skins/custom/NormBook_T/'},
> {'BASEPATH1': '', 'ids': ['0101', '0102', ... <snip lots of files>
> ], 'dtpref_rows': '20', 'a_': 0, 'dtpref_cols': '50', 'n_': 6,
> 'show_filter_form': '1', 'URL1':
> 'http://www.planetinterior.be/Normbook/portal_skins/custom/NormBook_T',
> 'SERVER_URL': 'http://www.planetinterior.be', 'VirtualRootPhysicalPath':
> ('',), 'new_ids': ['0101_T', '0102_T', ... <snip lots of files>
> ], 'AUTHENTICATED_USER': TimW, 'TraversalRequestNameStack': [], 'skey':
> 'id', 'tree-s': 'eJzTiFZ3hANPW/VYHU0ALlYElA', 'AUTHENTICATION_PATH': '',
> 'RESPONSE': ZServerHTTPResponse(''), 'PATH_INFO':
> '/VirtualHostBase/http/www.planetinterior.be:80/VirtualHostRoot/Normbook/por
> tal_skins/custom/NormBook_T/manage_renameObjects', 'PARENTS': [<Folder
> instance at 9bf4f28>, <Folder instance at 9a4c678>, <SkinsTool instance at
> 994c1b0>, <CMFSite instance at 833a578>, <Application instance at 97e8520>],
> 'rkey': '', 'PUBLISHED': <Python Method object at 0x9a5e580>, 'URL':
> 'http://www.planetinterior.be/Normbook/portal_skins/custom/NormBook_T/manage
> _renameObjects', 'manage_renameObjects': ' Ok ', '':
> 'manage_renameObjects'}) (2834)
> 
> Any hints?
> 
> TIA, Roel
> 
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )