)]}'
{
  "commit": "1bf412e78e87e0152e5aaa3af1a191beea6de61a",
  "tree": "72b7d1abbfe01f40e8f595208e2a78eec0ace90d",
  "parents": [
    "aa1e38f1f2b80c1e440dcb5c4b771c90c3bf628e"
  ],
  "author": {
    "name": "Luca Milanesio",
    "email": "luca.milanesio@gmail.com",
    "time": "Fri Jan 10 23:49:17 2025 +0000"
  },
  "committer": {
    "name": "Luca Milanesio",
    "email": "luca.milanesio@gmail.com",
    "time": "Mon Jan 13 03:14:47 2025 -0800"
  },
  "message": "Bind Gson.class as Singleton in EventBroker\n\nGerrit has an internal bus (EventBroker) responsible\nfor formatting and sending events to the other subsystems,\nincluding e-mail notifications, stream events, and other plugins.\n\nFor every event, a Gson object was injected through the use\nof EventGsonProvider, which was then creating custom serializer\nand deserializers.\n\nWith a simple 10 minutes load generated by 10 users, Gerrit was\ncreating a staggering 25k Gson objects and associated serializers.\n\nThere is no reason for not reusing Gson across events, as the\nclass instances are fully thread-safe [1].\n\n[1] https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.0/com/google/gson/Gson.html\n\nRelease-Notes: Reduce memory pressure on the JVM GC by reusing Gson objects across events\nChange-Id: Icd156855906166dd5805e3841d5a7420ed5a7bed\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2697da5118297710d324a70a18a0e7f6c81539ed",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/server/events/EventBroker.java",
      "new_id": "71256bd6ec1bddd6518406ecc53898e36789f879",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/server/events/EventBroker.java"
    }
  ]
}
