)]}'
{
  "commit": "edf4368b0c29e25bb74ec0e8f12070582a580eea",
  "tree": "31d0bf5fbaf5f4cd3b9cf44f0907c026bf79dd1d",
  "parents": [
    "89b91ad40677c7048d31925986e48150e975bcce"
  ],
  "author": {
    "name": "Dave Borowitz",
    "email": "dborowitz@google.com",
    "time": "Wed Mar 18 11:04:26 2015 -0700"
  },
  "committer": {
    "name": "Dave Borowitz",
    "email": "dborowitz@google.com",
    "time": "Wed Mar 18 13:38:57 2015 -0700"
  },
  "message": "TemporaryBuffer: Allow presizing block pointer list\n\nCallers may wish to use TemporaryBuffer as an essentially unbounded\nbuffer by passing Integer.MAX_VALUE as the size. (This makes it\nbehave like ByteArrayOutputStream, only without requiring contiguous\nmemory.) Unfortunately, it was always allocating an array in the\nbacking block pointer list to hold enough blocks to MAX_VALUE--all\n262,016 of them. It wasn\u0027t allocating the blocks themselves, but this\narray was still extremely wasteful, using about 2MiB of memory on a\n64-bit system.\n\nTweak the interface to specify an estimated size, and only allocate\nthe block pointer list enough entries to hold that size. It\u0027s an\nArrayList, so if that estimate was wrong, it\u0027ll grow. We assume the\ncost of finding enough contiguous memory to grow that array is\nacceptable.\n\nWhile we\u0027re in there, fix an off-by-one error: due to integer division\nwe were undercounting the number of blocks needed to store n bytes of\ndata as (n / SZ).\n\nChange-Id: I794eca3ac4472bcc605b3641e177922aca92b9c0\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9817cdc0a1e2697d973330257b3a4d04b9a70c3e",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/util/TemporaryBufferTest.java",
      "new_id": "d978804d579e6e72a7ecb511c98eadb40037dd4a",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/util/TemporaryBufferTest.java"
    },
    {
      "type": "modify",
      "old_id": "10aade4e11e070808b0100a00415a5e3bbac5bec",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java",
      "new_id": "0a8c5945d9959b074010326275e594d8c3820863",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java"
    }
  ]
}
