Balance between performance and memory
As you learned earlier, memory operation takes a lot time. However, developers always have a limited memory. So, it is extremely necessary to have a balance between performance and memory.
Loading or unloading any asset from ROM to RAM takes time, so it is recommended that you do not do such operations for games that depend on FPS. This operation affects FPS significantly.
Suppose a game requires a lot of assets while running one game state and the target device has a limited heap available. In such a case, the developer should group assets. Small assets can be loaded in the game running the state only in required cases.
Sometimes, many developers preload all the assets and use it from cache. This approach makes the gameplay smoother and faster. However, loading assets in a cache that is not required for that particular game state may crash the game if an interrupt occurs. The Android OS is fully authorized to clear memory occupied by inactive or minimized...