Performance: PlayerPrefs for simple data
MEDIUM IMPACT
This affects the speed of saving and loading small pieces of data during gameplay or app usage.
PlayerPrefs.SetInt("HighScore", 12345); // No immediate Save call, rely on Unity auto-save
PlayerPrefs.SetString("PlayerName", largeJsonString);
PlayerPrefs.Save();| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Saving large JSON string with PlayerPrefs | N/A | N/A | Blocks main thread causing frame drops | [X] Bad |
| Saving small int or string with PlayerPrefs | N/A | N/A | Minimal impact, fast access | [OK] Good |