Our Global Presence
Canada
57 Sherway St,
Stoney Creek, ON
L8J 0J3
India
606, Suvas Scala,
S P Ring Road, Nikol,
Ahmedabad 380049
USA
1131 Baycrest Drive,
Wesley Chapel,
FL 33544
In Android 11, it’s introduced IORap, a new feature which greatly improves application startup times. We have observed that apps start more than 5% faster (cold startup) on average across a variety of devices. Some hero cases show 20%+ faster startup times. Users get this additional performance without any developer app changes!
IORap reduces app startup times by predicting which I/O will be required and doing it ahead of time. Many app startups have a lot of time that the IO request queue isn’t being saturated because of blocking I/O. As a result, we aren’t maximizing IO latency. After prefetching the data and compacting the I/O, the app can access this data nearly instantly from the pagecache
, significantly reducing app startup latency.
When we evaluated some popular top apps from the Play Store, 80%+ spent 10%+ time in blocking I/O during launch time. while ~50% of the apps even spent 20%+ time. A majority of apps we looked at could benefit from IORap.
IORap works as an independent service on the device. It interacts with package manager, activity manager, perfetto
service, etc via IPC. The overall architecture of IORap is shown in the following figure:
Step 1: Collecting perfetto traces
IORap uses a profiling-based strategy to determine the I/O to be prefetched. The knowledge comes from perfetto
trace, which records the kernel pagecache
page removals/additions (from ftrace). In the first several cold-runs of an app, the perfetto
tracing is on to get the pagecache missing events. Our study shows the overhead of perfetto
tracing on startup time is neglectable.
Step 2: Generating prefetch list
Based on the perfetto
traces obtained from the prior step, IORap generates a prefetch list during the idle time of the device. Basically, the prefetch list contains the information of the file (name, offset, length) that was accessed by an app when it’s launched. IORap analyzes the mm_pagemap
events from the perfetto
trace and converts its result (inode
, offset, length) to (name, offset, length) by reversing inode
to filename. Data is then stored in the prefetch list, which is a protobuf
file.
Step 3: I/O prefetching
After the prefetch list is generated, IORap can prefetch the corresponding data for the following runs of the app. The perfetto
tracing is not needed any more. The user and developer don’t need to do anything. The prefetching is performed when the user taps on the icon or indirectly via another app requesting it via Intent. Enjoy the speedup!
Step 4: Obsoleting the prefetch list
The prefetch list doesn’t live forever. Several events may cause the prefetch list to become obsolete. When an app is updated, the prefetch list is deprecated because the app may change and the previous data may be inaccurate. Also, the dexopt
service can optimize the app after installation. Once the app is optimized, the layout may differ making the prefetch
list obsolete. The obsolete prefetch list will be removed and a new round will start with perfetto trace collections.
Collating results from several experiments in our lab we determined that IORap benefits cover the spectrum from low end to high end devices. On average, IORap could provide up to ~26% speedup. It’s extremely helpful for apps that have heavy I/O during startup. For example, Spotify shows double digit improvement for both low-end devices (Go and Pixel 3A) and high end-devices (Pixel 3 or 4).
One interesting observation during the experiment is that the performance of IORap is largely impacted by the amount of prefetched data. An accurate trace duration is super important for IORap. A shorter trace duration causes less data than necessary to be prefetched and less performance gain. On the other hand, a longer one leads to more data than necessary being prefetched, which may result in slower startup in worst case scenarios. IORap uses the timestamp of when an app reports the ReportFullyDrawn
event to estimate trace duration. For apps not reporting this event, the display time is used. So invoking the reportFullyDrawn
callback at the right time can improve the performance of IORap.
We’re excited about the improvement that IORap has shown, and we plan to explore this concept more in the future in the following two directions. Firstly, prefetching more often. It would be great if prefetching could be done during profiling. Then we could eliminate some of the performance gap before generating the prefetching list by providing a prebuilt prefetching list. Secondly, IORap could predict that an app will start and begin prefetching earlier, further speeding up startup time.
For more information and to develop Android Mobile Apps, Hire Android Developer from us as we give you a high-quality product by utilizing all the latest tools and advanced technology. E-mail us any clock at – hello@hkinfosoft.com or Skype us: “hkinfosoft”. To develop Android Mobile Apps, please visit our technology page.
Content Source:
Every production mobile app ultimately has a set of recurring tasks around integration, testing, deployment, and long term maintenance. These tasks often must be automated across a team of many developers and app projects. Building a process for these tasks can be incredibly time consuming and require specialized infrastructure experience, but is critical for the success of any serious app project.
Thankfully, teams don’t need to build solutions to these problems themselves, as there are services out there that can help. One such service works directly with your Cordova or Capacitor app to help your team easily perform these tasks. That means consistent builds, deploys on every commit, pushing remote app updates in realtime, and automating app store deployment as part of your mobile CI/CD workflow.
That service is Appflow, and it’s Ionic’s official Mobile DevOps platform. Appflow automates the whole DevOps side of your mobile app project, and is used to power significant apps and development teams across AAA, Burger King/Popeyes, Shipt, and more.
Let’s explore what a Mobile DevOps platform like Appflow is, what Appflow offers, how it differs from traditional CI/CD platforms, and how it’s being used today.
Appflow is known as a Mobile DevOps platform.
Mobile DevOps platforms, of which Appflow is one of the leaders, automate and simplify many continuous integration and delivery tasks, as well as other important mobile app deployment tasks. These platforms handle the heavy lifting so teams can focus on building their unique app, instead of reinventing the wheel.
Those tasks may include:
Beyond these tasks, DevOps is all about creating a culture of shipping often, involving stakeholders, and ensuring quality. All of which Mobile DevOps products can help your team embrace.
Appflow is the official Mobile DevOps platform built by the Ionic team, focused on bringing powerful Mobile DevOps workflows to hybrid app developers across Capacitor and Cordova whether or not they are using Ionic Framework.
Appflow, first and foremost, is a managed mobile build environment. That means it provides consistent and frequently updated iOS, Android, and web build environments. The Appflow team does the hard work of keeping mobile build tools and operating systems up to date and patched for security issues, whether that means updating to the latest versions of Xcode or the Android SDK, or new versions of macOS and Linux, and a whole lot more.
These builds are done in a highly secure environment, so teams can feel confident in offloading their mobile CI/CD process to Appflow, and on high performance hardware to make builds match the speed of development.
Appflow also manages authentic, legal Mac build hardware for fully automating iOS builds in the cloud, which also benefits developers on Windows machines that wish to build iOS apps but can’t or don’t want to buy Mac hardware.
On top of this environment, Appflow provides some pretty transformative features for hybrid app developers. Namely, the ability to remotely update an app without needing to re-submit to app stores (in a way that is App Store ToS friendly!), as well as publish app binaries directly to the Apple App Store and Google Play Store.
And Appflow can automate that whole process so it triggers on each commit, as well as enable powerful version splitting so testers, stakeholders, and customers can run on different versions of an app.
In the CI/CD space, there are generic build services like Circle CI or GitHub Actions, and there are specialized services like Appflow.
The biggest difference between the services is that Circle CI or GitHub Actions merely provide build servers, a way to trigger builds, and hooks for sending those builds elsewhere. They do not provide the tools or pipeline for mobile-specific builds, they do not handle the deployment of your app, and they certainly don’t manage build environments for you.
Here’s a visualization of the differences between the two approaches:
In theory, teams could build their own Appflow-style pipeline on another generic CI/CD platform like Circle CI or GitHub Actions, but that would require teams orchestrate and keep up to date a very complex chain of tools, operating systems, build environments, app store submission features, remote app deployment, and more. This is guaranteed to take a full team of engineers with a different skillset than the app dev team to build and manage, especially as new mobile and desktop operating systems are released each year.
It’s simply not feasible for the vast majority of teams to take this on in addition to building their apps.
This is why a specialized build service like Appflow stands out in the CI/CD and DevOps space. Beyond simply being a build service, Appflow is a managed mobile build environment that is fully managed by the mobile experts here at Ionic.
Generic CI/CD tools, with their focus on simply triggering builds, are not a direct replacement for Appflow. That means the two can easily be used alongside each other.
In this scenario, a team might have their generic CI/CD tool trigger builds and push code to Appflow, while Appflow manages the hard work of performing mobile builds on managed mobile development infrastructure, while also handling the last mile app update and app store publishing.
This works so well that around 68% of Appflow customers are using Appflow alongside a general purpose CI/CD tool, according to data from the 2020 Ionic Developer Survey.
This delivers the best of both worlds: You get to continue using your CI/CD tool of choice – or whatever your company has standardized on – while leaving the highly specialized, mobile specific build and publishing requirements to Appflow.
For more information and to develop mobile apps using Ionic, Hire Ionic Developer from us as we give you a high-quality product by utilizing all the latest tools and advanced technology. E-mail us any clock at – hello@hkinfosoft.com or Skype us: “hkinfosoft”. To develop Mobile Apps using Ionic, please visit our technology page.
Content Source:
57 Sherway St,
Stoney Creek, ON
L8J 0J3
606, Suvas Scala,
S P Ring Road, Nikol,
Ahmedabad 380049
1131 Baycrest Drive,
Wesley Chapel,
FL 33544
57 Sherway St,
Stoney Creek, ON
L8J 0J3
606, Suvas Scala,
S P Ring Road, Nikol,
Ahmedabad 380049
1131 Baycrest Drive,
Wesley Chapel,
FL 33544
© 2024 — HK Infosoft. All Rights Reserved.
© 2024 — HK Infosoft. All Rights Reserved.
T&C | Privacy Policy | Sitemap