测量混合应用程序的内存影响

Memory problems are always challenging to detect and fix for mobile applications, particularly on Android, due to many hardware profiles, OS versions, and OEM skins. With proper memory reporting and analysis, most issues are caught during the development lifecycle. Yet if your application is delivering an entire platform, such as the Salesforce Mobile App, the high degree of customization can produce unanticipated spikes in memory usage. As a hybrid app with integrated web and native layers, bearing these memory spikes across the whole stack can lead to unpredictable behavior!

由于许多硬件配置、操作系统版本和OEM皮肤的存在,对于移动应用程序来说,内存问题的检测和修复总是具有挑战性,特别是在Android上。通过适当的内存报告和分析,大多数问题都能在开发生命周期内被发现。然而,如果您的应用程序正在提供整个平台,如Salesforce移动应用程序,高度的定制化可能会产生意想不到的内存使用高峰。作为一个集成了网络和原生层的混合应用程序,在整个堆栈中承受这些内存峰值可能会导致不可预测的行为!

Thankfully, there are several tools available for testing across an array of devices with automation, such as Firebase Test Lab and Saucelabs. A well-designed app recovers gracefully when the operating system triggers a memory warning or frees up resources. In the best-case scenario, memory issues manifest as slightly sluggish behavior, and in the worst case, they result in an application crash. iOS memory issues have been famously categorized in a blog article from Facebook Engineering as Low Memory Warnings (LMW), Foreground Out of Memory (FOOM) crashes, or Background Out of Memory (BOOM) crashes. But what happens when your hybrid app suffers from memory problems without any obvious symptoms? How does one begin to measure them?

值得庆幸的是,有几个工具可以在一系列设备上进行自动化测试,如Firebase Test LabSaucelabs。当操作系统触发内存警告或释放资源时,一个设计良好的应用程序会优雅地恢复。在最好的情况下,内存问题表现为轻微的迟缓行为,在最坏的情况下,它们会导致应用程序崩溃。iOS的内存问题在Facebook Engineering的一篇博客文章中被著名地归类为低内存警告(LMW)、前台内存不足(FOOM)崩溃或后台内存不足(BOOM)崩溃。但是,当你的混合应用程序遭受内存问题而没有任何明显的症状时,会发生什么?如何开始衡量它们呢?

Earlier this year, one of our customers reported a strange issue. Many of their users were greeted with an Internal Server Error when accessing a record detail view. After a thorough investigation, we narrowed it down to the offending change li...

开通本站会员,查看完整译文。

Home - Wiki
Copyright © 2011-2024 iteam. Current version is 2.139.0. UTC+08:00, 2024-12-23 05:18
浙ICP备14020137号-1 $Map of visitor$