P-Y on Nostr: If I could iterate on dominated nodes going from leaf dominated and progressively up, ...
If I could iterate on dominated nodes going from leaf dominated and progressively up, I could have each node add its own shallow+retained size just to its direct dominator, and things would automatically bubble up without having to recurse up chain.
As it turns out, I keep track of the list of nodes visited, in bfs order. So if I go through that list in reverse order and do a direct dominator size update for each node, that should work.
Published at
2024-05-17 03:34:54Event JSON
{
"id": "4627990f99803108769087f181c3dd84d6a7a3953873a21f4eba7b893cea367d",
"pubkey": "2b9c6c28bce249a1ef28497a2ec6f6c01bc7be0721124b8ce7da3e1592080c57",
"created_at": 1715916894,
"kind": 1,
"tags": [
[
"e",
"99d7fdbd5a1bdae1eb71862224c59a397464266f92e4d0ef67e4bd5353673c0d",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://androiddev.social/users/py/statuses/112454329566041064",
"activitypub"
]
],
"content": "If I could iterate on dominated nodes going from leaf dominated and progressively up, I could have each node add its own shallow+retained size just to its direct dominator, and things would automatically bubble up without having to recurse up chain.\n\nAs it turns out, I keep track of the list of nodes visited, in bfs order. So if I go through that list in reverse order and do a direct dominator size update for each node, that should work.",
"sig": "940757366ae4d730cc8a05c276c01e0c448d75b7db6d5ad1b13fdf67fbc9f616a2ae8a192b86d5f7b6b329a5c4038cfa34b69c90b877fac17a1ce4ca161264f5"
}