Calling access(username, channelname) multiple times result in negative performance implications

I can’t configure the static user-channel access in the sync gateway config file, because I need a dynamic mapping during run time. So I plan to use “access(username, channelname)” in the Sync Function. But I see this:

The effects of all access calls by all active documents are effectively unioned together, so if any document grants a user access to a channel, that user has access to the channel. Calling access(username, channelname) multiple times to grant the same user access to the same channel will result in negative performance implications.

I plan to create one channel per user basis, for example:

access(“user”, doc.userId)

In this case, the access might be called multiple times during whole lifetime of replication from the mobile. Will this cause any negative performance impact?

Any thing missing in my question?

HI @Sam_Y.C,

yes, it’s will let your cpu resource occupy very high. even let’s can’t sync with lite.

angular

Do you know, how to design the private channel for each customer ID?

I have the similar problem, do you find any solution?