Commit d4e6259e authored by Nicolas Delaby's avatar Nicolas Delaby

Use gid to increase performance

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15163 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 302b40ee
...@@ -1038,11 +1038,11 @@ class Subscription(Folder, SyncCode): ...@@ -1038,11 +1038,11 @@ class Subscription(Folder, SyncCode):
pass pass
o_id = signature.getObjectId() o_id = signature.getObjectId()
#try with id param too, because gid is not catalogged #try with id param too, because gid is not catalogged
object_list = self.getObjectList(gid = gid, id = o_id) object_list = self.getObjectList(gid = b16decode(gid), id = o_id)
if o is not None and o in object_list: if o is not None and o in object_list:
return o return o
#XXX Slow !!! #XXX Slow !!!
object_list = self.getObjectList(gid = gid) object_list = self.getObjectList(gid = b16decode(gid))
for o in object_list: for o in object_list:
o_gid = self.getGidFromObject(o) o_gid = self.getGidFromObject(o)
if o_gid == gid: if o_gid == gid:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment