[CalendarServer-changes] [275] CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method. propfind.patch

source_changes at macosforge.org source_changes at macosforge.org
Wed Oct 18 08:03:51 PDT 2006


Revision: 275
          http://trac.macosforge.org/projects/calendarserver/changeset/275
Author:   cdaboo at apple.com
Date:     2006-10-18 08:03:49 -0700 (Wed, 18 Oct 2006)

Log Message:
-----------
PROPFIND performance improvement.

Modified Paths:
--------------
    CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch

Modified: CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch	2006-10-17 21:10:06 UTC (rev 274)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch	2006-10-18 15:03:49 UTC (rev 275)
@@ -20,3 +20,31 @@
      x = waitForDeferred(d)
      yield x
      x.getResult()
+@@ -116,11 +120,11 @@
+             uri = normalizeURL(request_uri)
+             if self.isCollection() and not uri.endswith("/"): uri += "/"
+ 
+-        resource_properties = waitForDeferred(resource.listProperties(request))
+-        yield resource_properties
+-        resource_properties = resource_properties.getResult()
++        if search_properties is "names":
++            resource_properties = waitForDeferred(resource.listProperties(request))
++            yield resource_properties
++            resource_properties = resource_properties.getResult()
+ 
+-        if search_properties is "names":
+             properties_by_status = {
+                 responsecode.OK: [propertyName(p) for p in resource_properties]
+             }
+@@ -138,7 +142,10 @@
+                 properties_to_enumerate = search_properties
+ 
+             for property in properties_to_enumerate:
+-                if property in resource_properties:
++                has = waitForDeferred(self.hasProperty(property, request))
++                yield has
++                has = has.getResult()
++                if has:
+                     try:
+                         resource_property = waitForDeferred(resource.readProperty(property, request))
+                         yield resource_property

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20061018/6647704c/attachment.html


More information about the calendarserver-changes mailing list