The MCP server needs to look up the node index for an object id.
Currently this reuses the getAggregates() call, which iterates
through the objects on the main isolate.
This CL adds a new method nodeIndexForId() such that this work can
be performed on the worker isolate. This should avoid any
serialization except for the final node index result value.
There may even be cases where getAggregates() does not find the
given object id because e.g. objects with self_size == 0 do not show
up in the summary view.
Bug: 497855658
Change-Id: I78396a269bf285b5dbb76b3e9405b56f73e1b61a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7899812
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Nikolay Vitkov <nvitkov@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>