From d939c91e7817d329310c9ae9b7ca178006dfa80a Mon Sep 17 00:00:00 2001 From: Logan Allen Date: Wed, 31 Mar 2021 11:26:00 -0500 Subject: [PATCH 1/3] graph-store: speed up +validate-graph by using +turn and no longer virtualizing --- pkg/arvo/app/graph-store.hoon | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pkg/arvo/app/graph-store.hoon b/pkg/arvo/app/graph-store.hoon index b717d5ec6..f15f2fcc6 100644 --- a/pkg/arvo/app/graph-store.hoon +++ b/pkg/arvo/app/graph-store.hoon @@ -259,6 +259,7 @@ ?& !(~(has by archive) resource) !(~(has by graphs) resource) == == + ~| "validation of graph {} failed using mark {}" ?> (validate-graph graph mark) =/ =logged-update:store [%0 time %add-graph resource graph mark overwrite] @@ -681,15 +682,16 @@ %cb /(scot %p our.bowl)/[q.byk.bowl]/(scot %da now.bowl)/[u.mark] == - %+ roll (tap:orm graph) - |= [[=atom =node:store] out=?] - ?& out - =(%& -:(mule |.((vale:dais [atom post.node])))) - ?- -.children.node - %empty %.y - %graph ^$(graph p.children.node) - == - == + =/ unused + %+ turn (tap:orm graph) + |= [=atom =node:store] + ^- ? + =/ side (vale:dais [atom post.node]) + ?- -.children.node + %empty %.y + %graph ^$(graph p.children.node) + == + %.y :: ++ poke-import |= arc=* From d34045f19069e9895dd022f01855596c5bf9152e Mon Sep 17 00:00:00 2001 From: Logan Allen Date: Wed, 31 Mar 2021 12:13:42 -0500 Subject: [PATCH 2/3] graph-store: fewer allocations in +validate-graph --- pkg/arvo/app/graph-store.hoon | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pkg/arvo/app/graph-store.hoon b/pkg/arvo/app/graph-store.hoon index f15f2fcc6..c5c299e60 100644 --- a/pkg/arvo/app/graph-store.hoon +++ b/pkg/arvo/app/graph-store.hoon @@ -682,16 +682,14 @@ %cb /(scot %p our.bowl)/[q.byk.bowl]/(scot %da now.bowl)/[u.mark] == - =/ unused - %+ turn (tap:orm graph) - |= [=atom =node:store] - ^- ? - =/ side (vale:dais [atom post.node]) - ?- -.children.node + %+ roll (tap:orm graph) + |= [[=atom =node:store] out=?] + ^- ? + ?& ?=(^ (vale:dais [atom post.node])) + ?- -.children.node %empty %.y %graph ^$(graph p.children.node) - == - %.y + == == :: ++ poke-import |= arc=* From 2791cd5d9a2a83f45bded623507c1633ff2fee08 Mon Sep 17 00:00:00 2001 From: Logan Allen Date: Wed, 31 Mar 2021 12:28:43 -0500 Subject: [PATCH 3/3] graph-store: scry only once during +validate-graph --- pkg/arvo/app/graph-store.hoon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/arvo/app/graph-store.hoon b/pkg/arvo/app/graph-store.hoon index c5c299e60..e7a9da5e9 100644 --- a/pkg/arvo/app/graph-store.hoon +++ b/pkg/arvo/app/graph-store.hoon @@ -676,12 +676,13 @@ |= [=graph:store mark=(unit mark:store)] ^- ? ?~ mark %.y - ?~ graph %.y =/ =dais:clay .^ =dais:clay %cb /(scot %p our.bowl)/[q.byk.bowl]/(scot %da now.bowl)/[u.mark] == + |- ^- ? + ?~ graph %.y %+ roll (tap:orm graph) |= [[=atom =node:store] out=?] ^- ?