More performance tips for Jetpack Compose

Поделиться
HTML-код
  • Опубликовано: 24 янв 2025

Комментарии • 34

  • @SiamakAshrafi
    @SiamakAshrafi 2 года назад +38

    That's a lot to remember and check. Please move as many checks into Android Studio warnings as possible!

    • @bentrengrove8024
      @bentrengrove8024 2 года назад +15

      Thanks for the feedback. Keep in mind, these are not requirements. These are tips to help solve issues you might run into after identifying you have a performance problem. We do provide lint checks wherever we can and continue to add more.

    • @SiamakAshrafi
      @SiamakAshrafi 2 года назад

      @@bentrengrove8024 True 🙂

  • @markonovakovic3838
    @markonovakovic3838 2 года назад +5

    great presentation. I like "tools over rules" approach and frequent disclaimers

  • @JoãoSantos-r8b
    @JoãoSantos-r8b Год назад +5

    dear god. I need to cry a bit

  • @ashishgautam2842
    @ashishgautam2842 2 года назад +1

    amazing, understanding compose day by day

  • @koetjape4440
    @koetjape4440 2 года назад +1

    Hello everyone. Could you explain me, why using lambda in 6:04 is more perofrmant ? I dont understand why and how it works. Thanks!

    • @markonovakovic3838
      @markonovakovic3838 2 года назад +5

      Compose is looking for minimal possible scope that needs to be recomposed.
      scope is function where State is read.
      if State is read inside "Parent" than "Parent" becomes scope, if it's read inside "Child" than "Child" becomes scope. but when State is read inside of lambda and that lambda becomes the scope and only it and it's children are/might be recomposed. here it has no children so only it, lambda, is recomposed, Compose doesn't have to look up the tree for the scope anymore.

    • @litpen8056
      @litpen8056 Год назад

      @@markonovakovic3838 in summary from understanding,
      lambda creates a child scope, making sure the parent scope is not touched/recomposes.

  • @julioconradomarinardila3269
    @julioconradomarinardila3269 7 месяцев назад

    Jetpack compose es una gran herramienta de trabajo

  • @diegoalarcon7010
    @diegoalarcon7010 Год назад +11

    am I the only one who thinks that all of this is very difficult to remember? I have more than 5 years working with Android and everyday there's something new to improve

    • @litpen8056
      @litpen8056 Год назад +2

      then later on, after mastering this library, a new library is introduced.

    • @kitmak8495
      @kitmak8495 5 месяцев назад

      This is not something to remember, this is something that you want to understand in a fundamental level. Checkout the thinking in compose doc and it all makes sense. You don't need to memorize all these, it's a paradigm.

  • @coldwised
    @coldwised 11 месяцев назад

    should we use remember in the latest version for derivedStateOf?

  • @CommanderSteps
    @CommanderSteps 2 года назад

    Thank you for this video! Performance tips are always helpful. 🙏🏻

  • @McMouse88
    @McMouse88 11 месяцев назад

    It was very interesting, thank you so much )

  • @devnachi
    @devnachi Год назад

    I had a doubt that will if i have two composable nesting from a parent composable, and there is a mutable list passed to the first child but no change occurs to second child but it still recomposes. But if the parent is itself part of a list than will all the instances also recompose runtime or only the particular list item affected ?

    • @litpen8056
      @litpen8056 Год назад +1

      cannot skip if parameter is unstable or mutable state parameter changes. that is it. from understanding.

    • @devnachi
      @devnachi Год назад

      @@litpen8056 ok, got it! Actually I asked this, seeing a nested composable in one of my apps is incredibly slow on a fast fling scroll. And I cannot use the lazy column as it doesn't support nesting.

  • @ssverma1916
    @ssverma1916 2 года назад +1

    Very informative 👍

  • @AhmadSattout97
    @AhmadSattout97 2 года назад +2

    Then why even have non-lambda modifiers, if they are most of the time less performant??

    • @bentrengrove8024
      @bentrengrove8024 2 года назад +6

      Lambda modifiers aren't always more performant, they just can be in certain situations. If you don't have frequent changing state, a standard modifier will be more performant.

  • @puhgeh
    @puhgeh Год назад +1

    i know this is almost a year old, but could you please add timestamps? this is quite a lot to digest so we need it to go back and fort to rewatch specific topics.. thanks

  • @lemondog252
    @lemondog252 Год назад

    does anyone know where to find -composables.txt file?

  • @hellosagar
    @hellosagar Год назад

    is interfaces are stable?

  • @vengateshm2122
    @vengateshm2122 2 года назад +1

    That's lot to remember

  • @oguzhanaslan494
    @oguzhanaslan494 2 года назад

    Awesome!

  • @re7650
    @re7650 2 года назад +2

    How Google devs sleep 😴 after creating another "best practice more performance industry standard" code to remember every 6 months.

  • @1Ozgur
    @1Ozgur 2 года назад +2

    day by day, they are discovering how compose is complex and it is not easy to maintain 😂😂
    thanks, but i will continue to work with activities and fragment happily 🎉

    • @1Ozgur
      @1Ozgur 2 года назад

      @@estebanhiguitaduarte1318 if your project is small go ahead you can play with compose, but in a big scale project, i definitely not recommend to migrate. Just example from this video they suggest to use ImmutableList instead of List. And they say it is just a fix. So, in the future they may ask you to use Immutable Int or Immutable String to just make a performance fixes 😂. In my opinion compose has a very long way to take fragment xmls places.

  • @1Ozgur
    @1Ozgur 2 года назад +1

    and the perfect title can be honeymoon is over let's face with realities

    • @serpenheir
      @serpenheir 2 года назад +2

      Man, stop disgracing yourself leaving these comments. Did you ever try to optimize RecyclerView with various item types? Do you think parsing XML file is a way to go to layout user interface? Do you like View's lifecycle?

  • @Nick-cx4rs
    @Nick-cx4rs Год назад +1

    TopAppBar scrollBehavior still janking so much . Like exitUntilCollapsed Behavior() - > with nested connection to lazyColumn . So much janking fix it

  • @jansprlak110
    @jansprlak110 2 года назад +1

    Beta tester od roku 2016 oceňujem,,