      yield x
      yield x.getResult()
  
-@@ -144,7 +152,14 @@
+@@ -100,7 +109,8 @@
+     #
+     # Check authentication and access controls
+     #
+-    parent = waitForDeferred(request.locateResource(parentForURL(request.uri)))
++    parentURL = parentForURL(request.uri)
++    parent = waitForDeferred(request.locateResource(parentURL))
+     yield parent
+     parent = parent.getResult()
+ 
+@@ -117,7 +127,8 @@
+         yield x
+         x.getResult()
+     else:
+-        destparent = waitForDeferred(request.locateResource(parentForURL(destination_uri)))
++        destparentURL = parentForURL(destination_uri)
++        destparent = waitForDeferred(request.locateResource(destparentURL))
+         yield destparent
+         destparent = destparent.getResult()
+ 
+@@ -144,7 +155,19 @@
          log.err(msg)
          raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, msg))
  
 -    x = waitForDeferred(move(self.fp, request.uri, destination.fp, destination_uri, depth))
-+    #x = waitForDeferred(move(self.fp, request.uri, destination.fp, destination_uri, depth))
-+    x = waitForDeferred(put_common.storeResource(request,
-+                                                 source=self,
-+                                                 source_uri=request.uri,
-+                                                 destination=destination,
-+                                                 destination_uri=destination_uri,
-+                                                 deletesource=True,
-+                                                 depth=depth))
++    # Lets optimise a move within the same directory to a new resource as a simple move
++    # rather than using the full transaction based storeResource api. This allows simple
++    # "rename" operations to work quickly.
++    if (not destination.exists()) and destparent == parent:
++        x = waitForDeferred(move(self.fp, request.uri, destination.fp, destination_uri, depth))
++    else:
++        x = waitForDeferred(put_common.storeResource(request,
++                                                     source=self,
++                                                     source_uri=request.uri,
++                                                     destination=destination,
++                                                     destination_uri=destination_uri,
++                                                     deletesource=True,
++                                                     depth=depth))
      yield x
      yield x.getResult()
  

===================================================================
--- twisted/web2/dav/method/copymove.py	(revision 18545)
+++ twisted/web2/dav/method/copymove.py	(working copy)
@@ -38,7 +38,7 @@
 from twisted.web2.filter.location import addLocation
 from twisted.web2.dav import davxml
 from twisted.web2.dav.idav import IDAVResource

 from twisted.web2.dav.util import parentForURL
 
 # FIXME: This is circular
@@ -81,7 +82,15 @@
         # May need to add a location header
         addLocation(request, destination_uri)
 
