feat(android): optimize TiProperties#13944
Conversation
|
If it writes it via a background thread, isn't it possible to run into concurrency / synchronization issues, especially in edge cases? |
|
According to the SO post commit() still might be worse:
apply():
I don't have any issues with the current commit() part. No ANR in my console, it was an error from Slack, so hopefully we'll get some feedback there if this version is better or not |
|
I would personally not want to risk any breaking changes it the old one worked well. What was the initial reason for the PR? |
|
I've looked at the file because of the linked issue. Then after Android Studio also suggested to change from commit() to apply() I've made the PR. SDK tests still run without issues but it will take more testing and feedback to see if this makes any change or introduce other issues |
Applying Android Studio hint to use
applyinstead ofcommitto fix a potential ANR when saving TiPropertiesfixes #13942
SO post: https://stackoverflow.com/a/66717417/5193915

Screenshot of the hint