How Flutter 2.8 Enhance Mobile App Performance

How Flutter 2.8 Enhance Mobile App Performance?

Google released Flutter 2.8 with multiple improvements & updates. So, lets have a look at how Flutter 2.8 enhance mobile performance. We will focus on the key factors which are improved in the latest release of Flutter.

How Flutter 2.8 improves mobile performance?

Flutter 2.8 includes the update of the Dart 2.15 programming language. The update was presented at the same time. Also, higher performance is an important factor in this update. The Flutter team has announced that this update should also benefit existing mobile apps. The update will reduce the startup time and lower the storage requirements. Below we have explained the other features of this update in detail.

The Flutter team has been working on various aspects to reduce the latency when starting apps. This includes the interaction of the standard font manager with Dart VM’s garbage collection (GC). There was always a bottleneck in the setup of Dart when setting the font manager. Now developers can use Isolate so that both processes will run concurrently the next time. In addition, Flutter 2.8 avoids unnecessary GC cycles in DartVM during the app launch sequence. Let us understand this though the example. In Android, the framework will only notify DartVM before the first frame is rendered if a message about a memory bottleneck comes from TRIM_LEVEL_RUNNING_CRITICAL or later.

Fast loading of Dart VM AOT code will isolates services. This can be a problem for devices with low memory resources. For Android, Flutter 2.8 allows you to load services on more need-based way. It is now available in a separate bundle. Also very soon, platform threads will no longer have to wait for the platform view to be created. The purpose of all these measures is to reduce the boot time by half on weak Android hardware. But you’ll also get to see an improvement of 10% on more powerful devices.

In addition, Dart 2.15 has made a significant contribution by revising the concurrency model. Dart is built on the separation of independent execution units. This is to avoid common shared storage issues such as race conditions. In the new version, the darts team also introduced Isolate Groups. In such group releases, isolation includes various internal data structures of the current program. It allows individual elements to be leaner. This reduces the start time and reduces the memory requirements of individual execution units. According to blog posts, it’s up to 100 times higher in each case.

The Dart 2.15 syntax also allows you to dismantle the constructor. Previously, developers could only use function pointers when working with Dart’s core libraries. For example, when creating the Flutter UI, there was no useful feature. In the future, constructor tearoffs will make it easier to create column widgets in particular, as shown in the following TextWidgets example:

class FruitWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: ['Apple', 'Orange'].map(Text.new).toList());
  }
}

Memory:

Flutter enthusiastically loads Dart VM’s “Service Isolate” and the AOT code is bundled with the app, so Flutter developers targeting memory-constrained devices struggle to create performance traces. This was because Flutter was reading both things into memory simultaneously. For Android version 2.8, the Dart VM service isolation is split into separate bundles that can be loaded individually. This saves upto 40MB of memory until service isolate is required. Dart-VM further reduced memory requirements by up to 10% by notifying the operating system that the memory pages used by the AOT program are supported for files that probably do not need to be read again. Therefore, you can reuse and redirect pages that contain copies of file-based data.

Firebase

Another big part of the Flutter ecosystem is the FlutterFire. It is used in two-thirds of the Flutter app. This version adds many new features that make it easier to build applications with Flutter and Firebase:

  • All FlutterFire plugins can be switched from beta to stable.
  • New support for DartPad for many Firebase services.
  • New libraries that will facilitate the creation of user interfaces for authentication and live Firestore queries.
  • Last but not least, the new Firestore object / document mapping for Flutter available in alpha.

Conclusion:

So, in this article, we discussed about how Flutter 2.8 enhance mobile performance. Flutter will keep getting new updates and improvements.To know more you can read the official documentation of Flutter. Also, Do let us know your feedback/comments for further improvements.

Flutter agency is the best Flutter App development agency with a highly experienced team of Flutter developers. You can hire Flutter developers on hourly basis or for fixed budget. We promise to deliver the best application developed in Flutter, which will excel in the market. Also, Flutter Agency is a portal full of excellent resources like Flutter Widget Guide, Flutter Projects, Code libs, etc. So, contact us for your next project.

Nirali Patel

Written by Nirali Patel

Nirali Patel is a dedicated Flutter developer with over two years of experience, specializing in creating seamless mobile applications using Dart. With a passion for crafting user-centric solutions, Nirali combines technical proficiency with innovative thinking to push the boundaries of mobile app development.

Leave a comment

Your email address will not be published. Required fields are marked *


Discuss Your Project

Connect with Flutter Agency's proficient skilled team for your app development projects across different technologies. We'd love to hear from you! Fill out the form below to discuss your project.

Have Project For Us

Get in Touch

"*" indicates required fields

ready to get started?

Fill out the form below and we will be in touch soon!

"*" indicates required fields