)]}'
{
  "commit": "2f8bdb55482a274f7a7fe3cb87c34014f50fb003",
  "tree": "7203931aea370c5dd36a8c760b74a701a3306971",
  "parents": [
    "c0867245ec632091b53ab58704454b50723f7a84"
  ],
  "author": {
    "name": "Jeff Sharkey",
    "email": "jsharkey@android.com",
    "time": "Sun Apr 19 21:41:26 2020 -0600"
  },
  "committer": {
    "name": "Jeff Sharkey",
    "email": "jsharkey@android.com",
    "time": "Mon Apr 20 21:10:32 2020 -0600"
  },
  "message": "Offer to write Strings through Parcels as UTF-8.\n\nRecently while investigating some Binder limits, I discovered that\nwe\u0027re still sending Strings across Binder as UTF-16, which is very\nwasteful for two reasons:\n\n1. The majority of data flowing through APIs like PackageManager is\nalready limited to US-ASCII, and by sending UTF-16 we\u0027re wasting\nhalf of our transactions on null-byte overhead.\n\n2. Internally ART is already \"compressing\" simple strings by storing\nthem as US-ASCII instead of UTF-16, meaning every time we want to\nwrite a simple string to Binder, we\u0027re forced to first inflate it\nto UTF-16.\n\nThis change first updates Parcel.cpp to accept char* UTF-8 strings,\nsimilar to how it accepts char16_t* for UTF-16.  It then offers\nboth UTF-8 and UTF-16 variants to Parcel.java via JNI.  We also\nupdate the String8 handling to behave identical to String16.\n\nThis change adds benchmarking to show that these new methods are\nabout 50% faster for US-ASCII strings, and about 68% faster for\ncomplex strings that reference higher Unicode planes.  (So an\nimprovement in both cases!)\n\nBug: 154436100\nTest: atest FrameworksCoreTests:ParcelTest\nTest: make core-libart conscrypt okhttp bouncycastle vogar caliper \u0026\u0026 vogar --mode app_process --benchmark frameworks/base/core/tests/benchmarks/src/android/os/ParcelStringBenchmark.java\nChange-Id: I3447a0ce28994421977ca50ba8902651f73372f4\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "beab270387dea216fa0aa710d92fb2515f5ed4c8",
      "old_mode": 33188,
      "old_path": "libs/binder/Parcel.cpp",
      "new_id": "9642a87f4e0b82579f70e865ab2988252bf14450",
      "new_mode": 33188,
      "new_path": "libs/binder/Parcel.cpp"
    },
    {
      "type": "modify",
      "old_id": "4b1a758f385f92671d15e23910acf3055c66d2be",
      "old_mode": 33188,
      "old_path": "libs/binder/include/binder/Parcel.h",
      "new_id": "c1f64fb5417e501ad3ea3262044656d4d4873696",
      "new_mode": 33188,
      "new_path": "libs/binder/include/binder/Parcel.h"
    }
  ]
}
