Closed mwshubham closed 4 years ago
Hey @mwshubham ,
The library was not designed to be initialized on a background thread. However, you can do that even though it's not thread-safe out of the box (init
and getInstance()
might create a race condition).
Initialization invokes a shared preference under the hood, doing that on a background thread can potentially improve things. However, the library is already light enough and I don't think it can bring any tangible performance improvements.
Thanks for your reply. I agree with you that there will be no significant performance improvements in doing the same.
Is there any advantage/disadvantage of initializing the library on a background thread?