You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello.
We have noticed an intriguing behavior when updating the Flagship context.
Let's suppose we have this context: {"foo": "foo", "bar": "bar"}
And we update the context like so:
suspendfunupdateContext(context:HashMap<String, Any>) {
visitor.updateContext(context)
visitor.fetchFlags().await()
}
updateContext(hashMapOf("foo" to "foo"))
It doesn't look like fetchFlags() checks for context modification (visitor.flagFetchingStatus) before sending the API request, so it sends requests that are not necessary:
Flagship Version:
3.1.0
Bucketing mode
Hello.
We have noticed an intriguing behavior when updating the Flagship context.
Let's suppose we have this context:
{"foo": "foo", "bar": "bar"}
And we update the context like so:
Then we can see in the logs that
fetchFlags()
sends an API request to https://decision.flagship.io/v2/xxxxx/events, even though the context hasn't changed.It doesn't look like
fetchFlags()
checks for context modification (visitor.flagFetchingStatus
) before sending the API request, so it sends requests that are not necessary:flagship-android/flagship/src/main/java/com/abtasty/flagship/visitor/DefaultStrategy.kt
Line 69 in 1092282
Would it be possible to optimize
fetchFlags()
to only update flags when necessary, or add restrictions to avoid sending too many API requests?Thanks.
The text was updated successfully, but these errors were encountered: