)]}'
{
  "commit": "6c453ad79dd42e2c6bda511d6ed89a5743d5f5ae",
  "tree": "5e31ce9de00e17df9d1fe7696fb1fb170520bdbf",
  "parents": [
    "c264ed49d39f9728d1a8f9a6d8a96286fedc9349"
  ],
  "author": {
    "name": "luigi-rosso",
    "email": "hello@rive.app",
    "time": "Mon Apr 14 19:53:54 2025 +0000"
  },
  "committer": {
    "name": "luigi-rosso",
    "email": "hello@rive.app",
    "time": "Mon Apr 14 19:53:54 2025 +0000"
  },
  "message": "Make RectanglesToContour more memory efficient (particularly for re-runs).\n\n# Description\nIn the text input branch I realized I needed to re-use RectanglesToContour and that it would be called often when moving selection ranged cursors. The existing implementation closely matches our Dart one which is not very memory efficient, mostly due to it just being Dart.\n\n# Details\n- Try to store re-used containers on the RectanglesToContour class so allocation can happen less frequently when re-using the RectanglesToContour.\n- Try to avoid any forced heap allocation (although some is still bound to happen).\n- We had a lot of Vectors of Vectors. In almost all cases these got simplified to linear vectors or vectors of structs/classes. Because each vector does its own heap allocation, vector\u003cvector\u003cvector\u003c...\u003e\u003e\u003e can cause a lot of memory re-alloc when adding/removing elements.\n- The boolean inclusion vector got converted to a bitset which is also stored on the class so it can be re-used.\n- Nuke Rect as we have the same functionality in AABB.\n- Massaged the API a bit to have names match the updated API a little more closely.\n\nI\u0027ll add more comments inline below...\n\nDiffs\u003d\n5c4e83502f Make RectanglesToContour more memory efficient (particularly for re-runs). (#9438)\n\nCo-authored-by: Luigi Rosso \u003cluigi-rosso@users.noreply.github.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4ada50d36f4bfe52e984f4941f2cdf3609817457",
      "old_mode": 33188,
      "old_path": ".rive_head",
      "new_id": "3bbc7d794d7bfc0fa924e2f6ec0ba4c25fdbe5a0",
      "new_mode": 33188,
      "new_path": ".rive_head"
    },
    {
      "type": "modify",
      "old_id": "e437e078c0ffc31a21418c17fa10b90469b12a72",
      "old_mode": 33188,
      "old_path": "include/rive/math/aabb.hpp",
      "new_id": "8d661a93261cd436d1cf583fe454387010df2cb2",
      "new_mode": 33188,
      "new_path": "include/rive/math/aabb.hpp"
    },
    {
      "type": "delete",
      "old_id": "b1aebdbb82e114bad42a0944dd7acdec34deb4b3",
      "old_mode": 33188,
      "old_path": "include/rive/math/rect.hpp",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "modify",
      "old_id": "27d87315bffb7d16a374dbbfaa639944ccb330fa",
      "old_mode": 33188,
      "old_path": "include/rive/math/rectangles_to_contour.hpp",
      "new_id": "6a1581e4d1bcdd0ef24cf53908bf9b3113a3198d",
      "new_mode": 33188,
      "new_path": "include/rive/math/rectangles_to_contour.hpp"
    },
    {
      "type": "modify",
      "old_id": "672a73a68cde3db339db764bcc4c0a63a3c9471a",
      "old_mode": 33188,
      "old_path": "include/rive/math/vec2d.hpp",
      "new_id": "597d912a3ad42a4a93294b38293af8a686a0a002",
      "new_mode": 33188,
      "new_path": "include/rive/math/vec2d.hpp"
    },
    {
      "type": "modify",
      "old_id": "13495033b3b3167d5e7b2251498b0828ec05afcb",
      "old_mode": 33188,
      "old_path": "include/rive/span.hpp",
      "new_id": "b1302776a06545efbf38bb22dbe34df6f331c165",
      "new_mode": 33188,
      "new_path": "include/rive/span.hpp"
    },
    {
      "type": "modify",
      "old_id": "5c9238080d5f882b9f1575966bc658a90d75661b",
      "old_mode": 33188,
      "old_path": "include/rive/text/text.hpp",
      "new_id": "f05825df8b17ef3e3e96b774849198ed14930351",
      "new_mode": 33188,
      "new_path": "include/rive/text/text.hpp"
    },
    {
      "type": "modify",
      "old_id": "d23c11181b6c74ea8bf5fcadf7a6b7e3dbdbf0bb",
      "old_mode": 33188,
      "old_path": "include/rive/text/text_value_run.hpp",
      "new_id": "0397f377d5385abfd960b93e2b0015fe1c3a37c3",
      "new_mode": 33188,
      "new_path": "include/rive/text/text_value_run.hpp"
    },
    {
      "type": "modify",
      "old_id": "9bc63836f657bd63d20bf8b2f71fcf81c0891888",
      "old_mode": 33188,
      "old_path": "src/animation/state_machine_instance.cpp",
      "new_id": "25d00d2be1c9a8d0b88b3ee2557808c59d796f3b",
      "new_mode": 33188,
      "new_path": "src/animation/state_machine_instance.cpp"
    },
    {
      "type": "modify",
      "old_id": "13bd8f257d4e308b926cae0b6064aade7e12d738",
      "old_mode": 33188,
      "old_path": "src/math/rectangles_to_contour.cpp",
      "new_id": "51e3087fed0542d4460a85a7b0e8d2de3f87c67b",
      "new_mode": 33188,
      "new_path": "src/math/rectangles_to_contour.cpp"
    },
    {
      "type": "modify",
      "old_id": "50cc1596138951519327f67ae2a54e5ecffba62a",
      "old_mode": 33188,
      "old_path": "src/text/text.cpp",
      "new_id": "c189826eabd7512744998f6953c9279bb7bf4ecb",
      "new_mode": 33188,
      "new_path": "src/text/text.cpp"
    },
    {
      "type": "modify",
      "old_id": "09652643181485c656faf2a96e78c504eb8a75bd",
      "old_mode": 33188,
      "old_path": "src/text/text_value_run.cpp",
      "new_id": "1a6845ca30b67abb89a517ae041d1184dba11aa6",
      "new_mode": 33188,
      "new_path": "src/text/text_value_run.cpp"
    },
    {
      "type": "modify",
      "old_id": "80a7764a725fdf3a293b8d14877921c449bae99b",
      "old_mode": 33188,
      "old_path": "tests/include/rive_testing.hpp",
      "new_id": "a981e8e4154ccff0cfff5a153c5843083d4d4f61",
      "new_mode": 33188,
      "new_path": "tests/include/rive_testing.hpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "366053d1d00be633baefc967ff3734265f3ac234",
      "new_mode": 33188,
      "new_path": "tests/unit_tests/runtime/rectangles_to_contour_test.cpp"
    }
  ]
}
