Facebook 工程師 Alex Sourov 表示,早前多名的 Facebook 研發的工程師去了一趟非洲地區,目的是為了解當地用戶的 Facebook 使用體驗,其後他們在非洲購買了不同的低階 Android 手機,然後以當地網路測試 Facebook App,結果運行速度極慢,使用了半個小時後,整個月的流量已經耗盡,故在惡劣的網絡環境下, Facebook App 非洲用戶的使用體驗定必非常惡劣。

故此, Facebook 研發的工程師針對中低階手機的用戶,將Facebook App 啟動速度提高,減少加載功能,圖片使用 Webp 格式代替 Jpeg 和 PNG 格式,降低網絡流,據螢幕尺寸調整圖片尺寸等。

結果? These changes reduced start times by more than 50 percent in the six months following the trip to Africa.

原文節錄

Performance
In terms of performance, we wanted to improve slow start times on old devices. In the beginning, we focused on instrumenting the startup path and understanding the bottlenecks. There was no silver bullet in this process – we needed to carefully identify and remove each potential bottleneck.

For example, we found that start times were slower on single-core devices because too many features concurrently initialized themselves on application startup. We made sure to defer these initializations until after startup and, in some cases, until the features are used.

We also wanted the stories in News Feed to load faster. In order to rapidly display cached content on poor networks, we now fetch stories earlier in the process to allow more time to set up connections and download News Feed. The cold start path has been automated to ensure that we prevent further regressions in these areas.

These changes reduced start times by more than 50 percent in the six months following the trip to Africa.

來源:Improving Facebook on Android