-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LD Init taking more time than its Timeout suggests #272
Comments
Hi @efguydan, thank you for reporting this. Do you see this issue on a variety of devices and OS versions? It seems unlikely to be related so it could be good to eliminate those as possible root cause. Has anything else in the application changed along with the SDK version and necessary code updates as part of version migration? Does this slow initialization happen 100% of the time? If not, what percentage of the time do you see the slow behavior? Have you changed anything related to LDUser/LDContext anonymity or made changes to the set of attributes you include in the LDUser/LDContext? Thank you! We'll be looking into this in the next day or so. |
Hey @tanderson-ld. Thanks for the quick reply!
I hope these help your investigation. Thanks! |
Hey @tanderson-ld , We tested the update with a minified (obfuscated) release build and the timing was as we normally expected. Attached is an image with our tracer which measures the same time I was reproducing with the logs locally. The test was carried out with the same device as before. Google Pixel 4a (5G). Does this bit of information help? |
Hi again @efguydan. Could you clarify your last comment? You say "timing was normally as we expected" and then "the same time I was reproducing with the logs locally". I'm not sure if you're referring to the same behavior as you saw when using 3.6 or the same issue the ticket was opened for. |
Sure @tanderson-ld . So the behaviour with debug builds was described in the original description of this issue. i.e. (2s to 5s) with version LD 5.3.0 However, testing with a release build that has been minified & obfuscated leads to a more regular time under the same conditions (device & network). i.e. (200 to 500 ms) also with LD version 5.3.0. |
Interesting. I don't believe we have any logic in our SDK that varies based on debug vs release build. Do you vary any other analytics or tracing tools based on debug vs release? |
Hi @tanderson-ld , Thanks for the reply. No, We don't vary analytics/tracing tools based on debug vs release. |
Hi again @efguydan. We haven't found any other theories at the moment. Is there any chance the behavior existed in debug builds when using 3.6 and is just being noticed now? |
Hey @tanderson-ld , Thanks for the reply. |
@efguydan, have you ever seen the slow init time in an app build using the release configuration? |
Hey @tanderson-ld , sorry I missed this. No we haven't really noticed slow init times of this nature in release builds. |
Is this a support request?
This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the code in this library. If you're not sure whether the problem you are having is specifically related to this library, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going here and clicking "submit a request", or by emailing [email protected].
Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above.
Describe the bug
Hello. We are trying to update our LD Sdk from
3.6.0
to5.3.0
but we have noticed a huge jump in the time it takes to initialize the SDK. Going above even the timeout we have indicatedHere is the code snippet of our init
The code above gives a time of 4813 ms
We were able to reproduce this down to version
4.0.0
.To reproduce
Included the SDK in our project and ran the app.
This happens on every install and the time does vary between 2 and 5 seconds
Expected behavior
The set timeout should be respected
SDK version
5.3.0
Language version, developer tools
Kotlin - 1.9.23
OS/platform
Android 14
Additional Context
This also happens when we use the deprecated
init
that returns a future.future.get()
respects the set timeout butLDClient.Init
which Is expected to take negligible time sometime takes over 5 secondsThe text was updated successfully, but these errors were encountered: