Expensify / react-native-onyx

Persistent, offline-first state management solution for React Native. Easy to use with minimal config and boilerplate.
MIT License
160 stars 73 forks source link

perf: use one loop instead of three for getCachedCollection #546

Closed hurali97 closed 5 months ago

hurali97 commented 5 months ago

Details

This PR improves the getCachedCollection by using only one loop to do the job which was previously taking three loops.

Related Issues

https://github.com/Expensify/App/issues/41895

Automated Tests

Manual Tests

Author Checklist

Screenshots/Videos

Android: Native https://github.com/Expensify/react-native-onyx/assets/47336142/a7c766d1-7b55-459f-9d51-9d1d37062e95
Android: mWeb Chrome https://github.com/Expensify/react-native-onyx/assets/47336142/9227d869-8b9d-4fc2-a096-3c83bc26eda8
iOS: Native https://github.com/Expensify/react-native-onyx/assets/47336142/e9a70e60-2d7c-42d2-a2a0-da5cfa3769fa
iOS: mWeb Safari https://github.com/Expensify/react-native-onyx/assets/47336142/92b0924d-7576-410f-82a5-32b096a4ab45
MacOS: Chrome / Safari https://github.com/Expensify/react-native-onyx/assets/47336142/08eda0d1-3ad1-445c-add9-f2fbc0c44f1c
MacOS: Desktop https://github.com/Expensify/react-native-onyx/assets/47336142/e3a26833-38d0-40e7-a36d-61041822fd67
github-actions[bot] commented 5 months ago

🚀Published to npm in v2.0.38