Upper limit to number of targets?

I was reading through the docs for targets (overview and reference), but didn’t see any mention of performance impacts for having a large number or targets defined.

A deployment I’m working with is considering having the targets tab show 22 targets.

I know only offline users can have targets, and that they’re calculated on device, so it would be ideal if there was a way to estimate when there will be a negative impact of too many targets by, say, number of docs x of targets x replication depth or something similar.

Thanks!

3 Likes

Normally, I wouldn’t expect a large performance impact between having a under 10 targets and 20 targets.

When targets are calculated all relevant data is loaded in memory (all reports, contacts etc), and then this collection is iterated over to match against defined targets. Since we’re talking about < 50.000 objects, iterating them a discrete amount of times (20) shouldn’t be very costly - assuming that the target configured functions (like appliesIf) themselves are not very costly.

As far as I know, targets calculation and task calculation internals are quite similar, and they iterate over the same collection. I would expect having 20 targets to be roughly the same as having 20 task definitions.

We could definitely test it!

Great - thanks @diana ! I’ll encourage the deployment I’m working to try it out in their test instance and let you know if there’s any complications.