[CalendarServer-changes] [9144] CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav /method/report_addressbook_query.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Apr 17 13:44:49 PDT 2012
Revision: 9144
http://trac.macosforge.org/projects/calendarserver/changeset/9144
Author: gaya at apple.com
Date: 2012-04-17 13:44:49 -0700 (Tue, 17 Apr 2012)
Log Message:
-----------
optimization: don't check directory query results against same filter twice
Modified Paths:
--------------
CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/method/report_addressbook_query.py
Modified: CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/method/report_addressbook_query.py
===================================================================
--- CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/method/report_addressbook_query.py 2012-04-17 14:13:31 UTC (rev 9143)
+++ CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/method/report_addressbook_query.py 2012-04-17 20:44:49 UTC (rev 9144)
@@ -162,8 +162,8 @@
results, limited[0] = (yield directoryBackedAddressBook.directory.doAddressBookQuery( addressBookFilter, query, max_number_of_results[0] ))
for vCardResult in results:
- # match against original filter
- if filter.match((yield vCardResult.vCard())):
+ # match against original filter if different from addressBookFilter
+ if addressBookFilter is filter or filter.match((yield vCardResult.vCard())):
# Check size of results is within limit
checkMaxResults()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120417/16784609/attachment-0001.html>
More information about the calendarserver-changes
mailing list