运行Android Studio Profiler时,生成两个或三个“堆转储”后,在底部显示此消息:
The IDE is running low on memory and this might affect performance. Please consider increasing available heap.
即使停止分析器后,即使收到此消息,我的PC仍然运行非常缓慢,并且恢复性能的唯一选择是重新启动Android Studio。
为什么会这样?在项目上生成堆转储后,还有其他方法可以恢复性能吗?
将“ IDE最大堆大小”从1280 MB(默认)设置为2048 MB后,性能得到改善:
文件->设置->外观和行为->系统设置->内存设置