)]}'
{
  "commit": "a0bf926fda3f4111dbc2ff24d62c5d763f8c6d41",
  "tree": "30619ff5b7a3649fb710ee7a1d5136211244e955",
  "parents": [
    "93331f8b519ebb8a2fdcacc56f52d5a51f3d62c3"
  ],
  "author": {
    "name": "Gabriel Peal",
    "email": "gpeal@users.noreply.github.com",
    "time": "Mon May 08 18:26:19 2023 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon May 08 18:26:19 2023 -0700"
  },
  "message": "[Async Updates] First MVP of Async Updates (#2276)\n\nThis is the first MVP of async updates. This project is being funded by Airbnb Eng and likely wouldn\u0027t happen without their sponsorship.\r\n\r\nThe docs for the AsyncUpdates enum includes details on what is going on here but at a high level, Lottie has two hot paths:\r\n1. setProgress\r\n2. draw\r\n\r\nThis allows the former to happen off of them main thread _ immediately after_ draw completes so it is ready before the next one starts.\r\n\r\nIn many of my tests, the two paths were each accountable for ~50% of the total main thread work so this could reduce the main thread activity by ~50% or more.\r\n\r\nHere is an example of systrace before:\r\n\u003cimg width\u003d\"1258\" alt\u003d\"CleanShot 2023-04-09 at 15 24 34@2x\" src\u003d\"https://user-images.githubusercontent.com/1307745/230800026-d73bf779-a109-46ee-9396-a54753860be4.png\"\u003e\r\n\r\nYou can see setProgress being called immediately before draw.\r\n\r\nThis is what it looks like with async updates enabled:\r\n\u003cimg width\u003d\"1258\" alt\u003d\"CleanShot 2023-04-09 at 15 23 35@2x\" src\u003d\"https://user-images.githubusercontent.com/1307745/230800035-c6a2e02a-f47e-4cac-9394-4239ae27c524.png\"\u003e\r\n\r\nYou can see that draw happens first and then setProgress for the _next frame_ happens immediately after on a different thread.\r\n\r\nThis is experimental and defaults to AUTOMATIC but AUTOMATIC will default to false until this API is stabilized.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "dc479bb7c566880699eea7b6c9207470ce810782",
      "old_mode": 33261,
      "old_path": "issue-repro/src/main/res/layout/issue_repro_activity.xml",
      "new_id": "05ea4fbf068e479f0d1fd55bed110ea391909662",
      "new_mode": 33261,
      "new_path": "issue-repro/src/main/res/layout/issue_repro_activity.xml"
    },
    {
      "type": "modify",
      "old_id": "c7bc6e0d48e5837a316881f7117ce728441134d7",
      "old_mode": 33188,
      "old_path": "lottie-compose/src/main/java/com/airbnb/lottie/compose/LottieAnimation.kt",
      "new_id": "99b722f28b9a4514eeec4ae075ca574033a7a057",
      "new_mode": 33188,
      "new_path": "lottie-compose/src/main/java/com/airbnb/lottie/compose/LottieAnimation.kt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "842b3257f2703dce5dbbed25bd36c44343751807",
      "new_mode": 33188,
      "new_path": "lottie/src/main/java/com/airbnb/lottie/AsyncUpdates.java"
    },
    {
      "type": "modify",
      "old_id": "4f451fb87ebe119743ca72ddb414b302dbba1487",
      "old_mode": 33188,
      "old_path": "lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java",
      "new_id": "b17f60e8dfc139ac81ae2cea992d2dbdcd061936",
      "new_mode": 33188,
      "new_path": "lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java"
    },
    {
      "type": "modify",
      "old_id": "35fd123fecafdff6e0cdc94a2754b707995002bb",
      "old_mode": 33188,
      "old_path": "lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java",
      "new_id": "e493288432e1814c5016d182913fd2c1a5e59ef4",
      "new_mode": 33188,
      "new_path": "lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java"
    },
    {
      "type": "modify",
      "old_id": "113c80d03c81b4abc14d2b31a142cafd9bed070a",
      "old_mode": 33188,
      "old_path": "lottie/src/main/java/com/airbnb/lottie/model/layer/CompositionLayer.java",
      "new_id": "7c923a65974d05ca2c180e875a5243dd6c2b0889",
      "new_mode": 33188,
      "new_path": "lottie/src/main/java/com/airbnb/lottie/model/layer/CompositionLayer.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4d59f5ac8608c60b5a12f3e7adf2e033043115d0",
      "new_mode": 33188,
      "new_path": "lottie/src/main/java/com/airbnb/lottie/utils/LottieThreadFactory.java"
    },
    {
      "type": "modify",
      "old_id": "fcac1451c5f8ca22411a0c51522cd234ab5cb206",
      "old_mode": 33188,
      "old_path": "lottie/src/main/java/com/airbnb/lottie/utils/LottieTrace.java",
      "new_id": "3223e781fb6dbb049728167804a64b4f7b7d4134",
      "new_mode": 33188,
      "new_path": "lottie/src/main/java/com/airbnb/lottie/utils/LottieTrace.java"
    },
    {
      "type": "modify",
      "old_id": "c9fa4f3498e7918ce0c9e8f876f175b192af75af",
      "old_mode": 33188,
      "old_path": "lottie/src/main/res/values/attrs.xml",
      "new_id": "b9012a6eb900d0563ed5055356c0999ee17bd0b4",
      "new_mode": 33188,
      "new_path": "lottie/src/main/res/values/attrs.xml"
    },
    {
      "type": "modify",
      "old_id": "269ae98a2b192062ea7ffab98830188c0b498630",
      "old_mode": 33188,
      "old_path": "sample/src/main/kotlin/com/airbnb/lottie/samples/LottieApplication.kt",
      "new_id": "9ea95a429da0882b65fbee6434817b465385bd7d",
      "new_mode": 33188,
      "new_path": "sample/src/main/kotlin/com/airbnb/lottie/samples/LottieApplication.kt"
    },
    {
      "type": "modify",
      "old_id": "7482c2e60f0a11abebd87ec7bf0ca045c7ee1643",
      "old_mode": 33188,
      "old_path": "sample/src/main/res/layout/player_fragment.xml",
      "new_id": "c9d9d6412f2f232d117f70af55f7b2b44f46c15b",
      "new_mode": 33188,
      "new_path": "sample/src/main/res/layout/player_fragment.xml"
    }
  ]
}
