Wednesday, September 25, 2019

React native app optimization or Performance && clean

React native app optimization or Performance.









How to clear react native cache?


How to reset iOS Simulator or Erase all simulator data ?
To reset the iOS simulator and erase all simulator data go to menu and Hardware -> Erase All Content and Settings


How to clean iOS build ?
To clean the iOS build press Option+Shift+Command+K or go to Xcode menu Product -> Clean Build Folder.
This will only clean cache for your current target.


How to clean Android Build Cache
Go to root directly of your react native project and run following commands:
cd android && ./gradlew cleanBuildCache
or
cd android && gradlew cleanBuildCache


Happy Cleaning !!

.............................................................................................................................................................................................................................
 Memory Issues
The Problem

Memory leaks are one of the main problems, particularly for Android apps built on React Native because of many unnecessary background processes.

You can find leaks using XCode as follows:

a. Navigate to XCode > Product > Profile
b. Choose Leaks

You can find memory leaks using Android Studio as follows:

a. Start your React Native app normally
b. Run Android Studio
c. Navigate to Tools > Android > Enable ADB Integration
d. Click on Tools > Android > Android Device Monitor
e. After the Android Device Monitor starts, click on Monitor > Preferences
f. Use Perf Monitor to identify any memory leaks








No comments:

Post a Comment