提升 Shopify 应用的性能

As an integral part of Shopify's ecosystem, our mobile app serves millions of merchants around the world every single day. It allows them to run their business from anywhere and offers vital insights about store performance, analytics, orders, and more. Given its high-engagement nature, users frequently return to it, underscoring the importance of speed and efficiency.

作为Shopify生态系统的一个重要组成部分,我们的移动应用程序每天为全球数百万商家提供服务。它使他们能够随时随地经营业务,并提供有关店铺性能、分析、订单等重要见解。鉴于其高度参与性质,用户经常返回该应用程序,突显了速度和效率的重要性。

At the beginning of 2023, we noticed that our app's performance had decreased since we started migrating to React Native. Recognizing this, we embarked on a dedicated journey to improve the app's performance by the end of the year. We’re happy to report that we have met our goals and learned a ton along the way.

在2023年初,我们注意到自从开始迁移到React Native以来,我们的应用程序性能有所下降。鉴于此,我们着手进行了一次专门的性能改进之旅,目标是在年底之前改进应用程序的性能。我们很高兴地报告说,我们已经实现了我们的目标,并且在这个过程中学到了很多。

In this blog post, we’re sharing how we did it and hope others use it as inspiration to make their apps faster. After all, not all fast software is great, but all great software is fast.

在这篇博文中,我们分享了我们是如何做到的,并希望其他人以此为灵感来加快他们的应用程序。毕竟,并不是所有快速的软件都是伟大的,但所有伟大的软件都是快速的。

Defining and tracking our performance goals

定义和跟踪我们的性能目标

Setting the right goals is vital when aiming to improve performance. A fast app is fast, regardless of the technology, and these targets should not take the technology into account. We wanted Shopify App to feel as instantaneous as possible to merchants, so we aimed for our critical screens to load under 500ms (P75) and for our app to launch within 2s (P75). This goal seemed very ambitious in the beginning because the P75 for screen loads at the time was 1400ms and app launch was ~4s.

在提高性能时,设定正确的目标至关重要。一个快速的应用程序是快速的,无论使用的技术如何,这些目标不应考虑技术因素。我们希望 Shopify App 对商家来说尽可能地感觉即时,因此我们的关键屏幕加载时间目标是在500ms(P75)内,应用程序启动时间目标是2s(P75)。这个目标在开始时似乎非常雄心勃勃,因为当时屏幕加载的P751400ms,应用程序启动时间为~4s

Once we defined our targets we built internal performance dashboards that were real time and supported data filtering ba...

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

trang chủ - Wiki
Copyright © 2011-2024 iteam. Current version is 2.137.1. UTC+08:00, 2024-11-15 15:05
浙ICP备14020137号-1 $bản đồ khách truy cập$