Improving Performance with Baseline Profiles - MAD Skills

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 มิ.ย. 2024
  • With this episode of MAD Skills we continue with our performance series of videos. In this video you’ll learn about how to improve performance of your app using Baseline Profiles. Android Developer Relations Engineer Tomáš Mlynarič describes what Baseline Profiles are, how to generate them for your app and how to measure the effectiveness of using them.
    Baseline Profiles guidance → goo.gle/3QCXVI3
    Baseline Profiles Codelab → goo.gle/baseline-profiles-cod...
    Improving Performance → goo.gle/3QpaerK
    Performance Samples → goo.gle/3SHxYsK
    Watch more MAD Skills episodes → goo.gle/madskills
    Catch more videos on Performance → goo.gle/performance
    Subscribe to Android Developers → goo.gle/AndroidDevs
    #Featured #Performance #MADSkills
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 43

  • @user-ks4ki1ww1d
    @user-ks4ki1ww1d 11 หลายเดือนก่อน +1

    Tried implementing Baseline profiles for Android TV but it throws below error saying not yet supported in Android TV. May I know when will this be supported?
    Cause: androidTVApi31 has a device profile of Android TV.
    Wear, TV and Auto devices are presently not supported with Gradle Managed Devices.

  • @user-sd9fd6wy6o
    @user-sd9fd6wy6o ปีที่แล้ว

    I am seeing improvements in startup time using macro benchmark tool. But when I am trying to side load it and then taking out numbers. I am not seeing any improvements. Any reason why?
    Or how can I check whether the profile is getting used or not.

  • @YashNagayach
    @YashNagayach ปีที่แล้ว

    I implemented baseline profile in my app, it is showing some improvement when we run benchmark, but no improvement I can see on play console numbers for cold startup time. Any idea?

  • @user-pm5pe7oc2f
    @user-pm5pe7oc2f ปีที่แล้ว

    nice practice lesson

    • @AndroidDevelopers
      @AndroidDevelopers  ปีที่แล้ว

      We really appreciate your kind feedback! So glad you enjoyed the tutorial 😎
      Be sure to check out more MAD Skills episodes right here:
      goo.gle/madskills

  • @honglamvuthuy9674
    @honglamvuthuy9674 ปีที่แล้ว +1

    information very good

    • @AndroidDevelopers
      @AndroidDevelopers  ปีที่แล้ว

      Thanks for the love, Hong. You can check out even more MAD Skills episodes with the playlist here: goo.gle/madskills 😁

  • @tomasschwarz3669
    @tomasschwarz3669 ปีที่แล้ว +3

    Thanks! Can You provide more episodes of MAD Skills?

    • @AndroidDevelopers
      @AndroidDevelopers  ปีที่แล้ว +1

      Hi Tomas! You can check out the MAD Skills playlist here: goo.gle/MAD-Playlist

  • @andreiverdes
    @andreiverdes ปีที่แล้ว +1

    Hi! Awesome work! Could this just be a part of the default generating the app bundle flow? Just have to have a device connected when generating the aab...

  • @realcrys
    @realcrys ปีที่แล้ว +1

    I'm using this on my compose Wear OS app and it makes a huge difference in start up time. I'm now also trying to bring it to the phone app but struggle a bit with state, maybe somebody can point me into a direction. I want to have a critical screen in the baseline profiles which has a lot of unique code and is quite heavy, but to get there I need to log in. As far as I see, there is no way for me to inject a state into the app as benchmark and app are fully separate, so I need to use UiAutomator to log in?

    • @keyboardsurfer
      @keyboardsurfer ปีที่แล้ว +1

      I'm glad to hear your feedback and happy that you see Baseline Profiles making a difference for you. You can either use UiAutomator or create an intent which comes with a demo user credential which allows you to run through the critical path.

    • @realcrys
      @realcrys ปีที่แล้ว +2

      @@keyboardsurfer I didn't consider using Intents, that's a good approach. I added now two Intent extras, one to log the user in and one to reset the app. Works great :)

    • @cameronbateau6510
      @cameronbateau6510 หลายเดือนก่อน

      How many user credentials keep things the same?

  • @SuRPuiSSe
    @SuRPuiSSe ปีที่แล้ว +2

    So to have an app using jetpack compose and running smoothly as an app using xml, we have to do all of this ? it look's like it's evolving, just backwards.

  • @anxuan565
    @anxuan565 ปีที่แล้ว +2

    Thanks for many interesting knowledge

    • @AndroidDevelopers
      @AndroidDevelopers  ปีที่แล้ว

      We're happy to hear you enjoyed the video 😀
      Be sure to check out more episodes of MAD Skills right here:
      goo.gle/madskills

  • @surajvaishnav3253
    @surajvaishnav3253 ปีที่แล้ว

    getting this error:
    * What went wrong:
    Task 'pixel2Api31BenchmarkAndroidTest' not found in project ':benchmark'.

    • @mlykotom
      @mlykotom ปีที่แล้ว

      This feature is available in Android Gradle PLugin 7.3.0 and higher, so pls update.

    • @Sok4h
      @Sok4h ปีที่แล้ว

      Any solution to this? I have AGP 8.0

  • @brentmcd12
    @brentmcd12 ปีที่แล้ว +3

    this should be good to see the results for Chromebook apps when an app loads and performs well as exspected will use it more often where as if it has issues it's more of a turn off after time after time not improving 💻

  • @roadsoft8425
    @roadsoft8425 2 หลายเดือนก่อน

    I'm curious why is not make this performance improvements by default?
    Google Android SDK developers creates extra complexity for andorid developers around the world.
    Consider this post as my personal butthurt acquired over the years of andorid development

    • @cameronbateau6510
      @cameronbateau6510 หลายเดือนก่อน

      How many developers make the same assumption?

  • @nayandhabarde8346
    @nayandhabarde8346 ปีที่แล้ว

    Anyone else facing this? Task 'pixel2api30BenchmarkAndroidTest' not found in project ':benchmark'.

    • @zealscar
      @zealscar ปีที่แล้ว

      Yup, getting this same error. Which version of AGP is needed? I am using 7.2.2.

    • @anshshetty3412
      @anshshetty3412 ปีที่แล้ว

      @@zealscar Same here. U found any solution for this ?

    • @zealscar
      @zealscar ปีที่แล้ว

      @@anshshetty3412 using AGP 7.3.0 alpha7+ solves the task issue for time being.

    • @mlykotom
      @mlykotom ปีที่แล้ว

      The task is created with Gradle Managed Devices feature that comes with Android Gradle Plugin 7.3.0 and later, so please try updating it.

    • @YashNagayach
      @YashNagayach ปีที่แล้ว

      @@zealscar I implemented baseline profile in my app(Using latest versions), it is showing some improvement when we run benchmark, but no improvement I can see on play console numbers for cold startup time. Any idea?

  • @user-bg1do8uv9y
    @user-bg1do8uv9y ปีที่แล้ว

    Thank you for sharing your knowledge 🙏 Of the masterpieces of the mobile industry, I am attracted to social networks: Facebook, Instagram, TikTok, TH-cam and others..!😍
    I dream of giving the world a social network too. 🙏
    And I want to understand the nuances of building social networks from the inside! 🤓
    I have already taken online video lessons: Java course for beginners and advanced. I took a lesson on Kotlin, Android lessons for beginners. I have just started taking your MVVM course.
    And I see a bunch of other technologies…. that are posted on the Android developer vacancy… that I need to master for another two or three years for sure 🙏
    And I have not yet come to understand how social networks are built. 🥺
    Can you please advise something, what should I pay attention to in order to learn how to make social networks for native Android development?

  • @Vemu
    @Vemu ปีที่แล้ว +1

    Is it possible to do on Flutter?

    • @mlykotom
      @mlykotom ปีที่แล้ว +1

      Unfortunately it won't work for other frameworks (Flutter, React Native, etc), because these are compiled differently than native Android apps.
      AFAIK Flutter apps in release mode are fully AOT pre-compiled, so you should get good performance out of the box.

  • @ShadyAlAngham
    @ShadyAlAngham ปีที่แล้ว

    😎😎🖒

  • @kshih1416
    @kshih1416 2 หลายเดือนก่อน

    is it outdated?

  • @jg-jsbg4725
    @jg-jsbg4725 ปีที่แล้ว +1

    IMPROVING PERFORMANCE WITH BASELINE PROFILES - MAD SKILLS

  • @anmolsinghsahi7991
    @anmolsinghsahi7991 ปีที่แล้ว +1

    I'm using systemImageSource = "aosp", still getting this error: java.lang.IllegalArgumentException: Baseline Profile Collection requires a rooted device, and a rooted adb session. Use `adb root`. Anyone else got this error?

    • @mlykotom
      @mlykotom ปีที่แล้ว

      The aosp image should come with the rooted adb session already. Please make sure you use latest version of the Macrobenchmark library, because there was a fix to allow rooted sessions without calling adb root. Otherwise, not sure what could go wrong here without more information.
      If upgrading the version doesn't help, could you create a bug and provide more details so we can investigate it? issuetracker.google.com/issues?q=status:open%20componentid:1071684
      Thank you!

    • @vincedelricco3992
      @vincedelricco3992 ปีที่แล้ว

      @@mlykotom Thanks for the tip, I was running into this issue and upgrading the version fixed it for me. I went from 1.1.0-beta05 to 1.2.0-alpha05 👍

    • @YashNagayach
      @YashNagayach ปีที่แล้ว

      ​@@mlykotom I implemented baseline profile in my app(Using latest versions), it is showing some improvement when we run benchmark, but no improvement I can see on play console numbers for cold startup time. Any idea?

  • @PetrSvobodnik
    @PetrSvobodnik ปีที่แล้ว +1

    We did exact setup but when we run ./gradlew :benchmark:pixel2Api31BenchmarkAndroidTest -P android.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
    it fails
    Starting 3 tests on pixel2Api31
    benchmark.BaselineProfileGenerator > generate[pixel2Api31] FAILED
    java.lang.IllegalArgumentException: Baseline Profile Collection requires a rooted device, and a rooted adb session. Use `adb root`.
    at androidx.benchmark.macro.BaselineProfilesKt.collectBaselineProfile(BaselineProfiles.kt:45)
    benchmark.StartupBenchmark > startupNoCompilation[pixel2Api31] FAILED
    java.lang.AssertionError: ERRORS (not suppressed): NOT-PROFILEABLE
    WARNINGS (suppressed):
    benchmark.StartupBenchmark > startupBaselineProfile[pixel2Api31] FAILED
    java.lang.AssertionError: ERRORS (not suppressed): NOT-PROFILEABLE
    WARNINGS (suppressed):
    Tests on pixel2Api31 failed: There was 3 failure(s).

    • @mlykotom
      @mlykotom ปีที่แล้ว

      Pls make sure you use the latest (stable) versions for AGP - 7.3.1, Macrobenchmark 1.1.0 and Profile Installer 1.2.0.
      It looks like the library doesn't take into account the enabledRules argument - it was added in 1.1.0-rc02.

    • @YashNagayach
      @YashNagayach ปีที่แล้ว

      I implemented baseline profile in my app(Using latest versions), it is showing some improvement when we run benchmark, but no improvement I can see on play console numbers for cold startup time. Any idea?