)]}'
{
  "commit": "6d4ebea83b7217b66112df7268ffc5fa6dd2fd36",
  "tree": "12233d3952c20d5b5cbcae9cd52455c5ed547f50",
  "parents": [
    "01dddf659e03e2bd09b32f2291b3d3889c9dfd5a"
  ],
  "author": {
    "name": "Jens Johansen",
    "email": "jensj@google.com",
    "time": "Mon Oct 28 11:11:48 2024 +0000"
  },
  "committer": {
    "name": "Commit Queue",
    "email": "dart-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Mon Oct 28 11:11:48 2024 +0000"
  },
  "message": "[kernel] Optimize reading of metadata further\n\nThis optimization is based on the assumption (which at least holds true\nfor the dill file extracted from the mentioned bug) that only very few\nnodes actually have metadata associated with it. For the test file, more\nthan two million node-offsets is looked up, and only ~7.5 thousand nodes\nactually have metadata on it.\nWhat is done here is to assume that most often we ask offsets in order\nand that most often the answer is that there\u0027s no metadata (when we fall\ninto this case we can return `false` quickly) and we can skip looking up\nthe actual metadata. This furthermore - although not benchmark here -\nshould make it (a lot) faster in the case where we have multiple\nsubsections as we here only lookup in in one index. Only upon a `true`\nresponse from that we have to lookup in all subsections to find and read\nthe actual metadata to associate.\n\nReading the test file without metadata, taking an average of averages\n(average of 5 runs of the binary benchmarks output for\n\"AstFromBinaryEager\") takes: 374481.4 us.\n\nBefore https://dart-review.googlesource.com/c/sdk/+/391761 reading the\ntest file with metadata takes: 627120.68 us.\nThis was about a quarter of a second, or 67+% slower.\n\nWith https://dart-review.googlesource.com/c/sdk/+/391761 this number\nbecame: 441784.44 us.\nA reduction of ~185 ms, or almost 30%, making the tax of reading\nmetadata \"only\" ~18%.\n\nWith this CL this number goes to 398011.44 us.\nThis is a further reduction of ~43 ms, or almost 10% (for a combined\nreduction of ~230 ms or 36+%).\nThe tax of reading metadata is now ~6.3%.\n\nBug: https://github.com/flutter/flutter/issues/156713\nChange-Id: I20bbabecfc8976293fe897528d05fc2145e2a8c0\nReviewed-on: https://dart-review.googlesource.com/c/sdk/+/392021\nReviewed-by: Johnni Winther \u003cjohnniwinther@google.com\u003e\nCommit-Queue: Jens Johansen \u003cjensj@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f391af86da3098c786cdec7c64effc10ed9d5778",
      "old_mode": 33188,
      "old_path": "pkg/kernel/lib/binary/ast_from_binary.dart",
      "new_id": "c94195115f8b27dc6fc9607c92304dfb63234db0",
      "new_mode": 33188,
      "new_path": "pkg/kernel/lib/binary/ast_from_binary.dart"
    },
    {
      "type": "modify",
      "old_id": "dab9e6ee1a3920e48e0683805288eed278df0db1",
      "old_mode": 33188,
      "old_path": "pkg/kernel/test/binary_bench2.dart",
      "new_id": "c6776a9df01b0f1893c655804b4e11c5e148a29d",
      "new_mode": 33188,
      "new_path": "pkg/kernel/test/binary_bench2.dart"
    }
  ]
}
