I noticed that there is a huge slowdown in my sync function when saving documents if I call the access() function in my sync function. Without calling access() I can save a hundred documents in less than 5 seconds. If I make a call to access() in the sync function it takes over a minute to schedule the same number of documents. This is on sync gateway v1.1.0, running on an ubuntu 12.0.4 box (4 2.0GHz CPU, 7GB RAM, but also running couchbase server at the same time). I’m calling access like this(both input params are strings):
I tried with users that already have a few dozen channels and users with less than 5 channels and the functionality was the same.
I checked the sync gateway documentation and didn’t see a way to check if a specified user already has access to a channel, but is there a fast call I can make to see if the specified user (not the current user) already has access to that channel?