From 1bc0d0cd8ec9cc26b42d0df19491111e60242d3c Mon Sep 17 00:00:00 2001 From: Philip Monk Date: Thu, 7 Jul 2022 00:12:27 -0700 Subject: [PATCH] gall: don't reload if code is unchanged --- pkg/arvo/sys/vane/clay.hoon | 28 +++++++++++++++------------- pkg/arvo/sys/vane/gall.hoon | 14 ++++++++++++-- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/pkg/arvo/sys/vane/clay.hoon b/pkg/arvo/sys/vane/clay.hoon index ce1a56513a..ff4cd16a2e 100644 --- a/pkg/arvo/sys/vane/clay.hoon +++ b/pkg/arvo/sys/vane/clay.hoon @@ -4342,19 +4342,20 @@ |- ^+ sat ?~ sat ~ - :_ ^$(sat t.sat) :: for each agent :: - :- desk.i.sat =/ bil bill.i.sat - |- ^- bill - ?~ bil - ~ - :: - ?: (~(has in done) i.bil) - $(bil t.bil) - =. done (~(put in done) i.bil) - [i.bil $(bil t.bil)] + =^ this done + |- ^- [bill (set dude:gall)] + ?~ bil + [~ done] + :: + ?: (~(has in done) i.bil) + $(bil t.bil) + =. done (~(put in done) i.bil) + =^ next done $(bil t.bil) + [[i.bil next] done] + [[desk.i.sat this] $(sat t.sat)] :: ++ sort-desks |= [a=[=desk *] b=[=desk *]] @@ -4381,7 +4382,7 @@ =/ agent ~| [%building-app bill.i.sat] !<(agent:gall vase) =^ lid nub.f $(bill.i.sat t.bill.i.sat) [[[i.bill.i.sat [our desk.i.sat da+now] agent] lid] nub.f] - =. lad (weld new lad) + =. lad (weld lad new) $(sat t.sat) :: build-dais for each mark :: @@ -4653,10 +4654,11 @@ [mos ..^$] :: [%rise =desk =dude:gall on=(unit ?)] - =^ mos ruf + =^ m1 ruf =/ den ((de now rof hen ruf) our desk.arg.req) abet:(rise:den dude.arg.req on.arg.req) - [mos ..^$] + =^ m2 ruf abet:goad:(lu now rof hen ruf) + [(weld m1 m2) ..^$] == :: %tomb (tomb-clue:tomb hen clue.req) diff --git a/pkg/arvo/sys/vane/gall.hoon b/pkg/arvo/sys/vane/gall.hoon index 81a4708021..af7e6463af 100644 --- a/pkg/arvo/sys/vane/gall.hoon +++ b/pkg/arvo/sys/vane/gall.hoon @@ -47,6 +47,7 @@ :: control-duct: TODO document :: stats: TODO document :: watches: incoming and outgoing subscription state +:: code: most recently loaded code :: agent: agent core :: beak: compilation source :: marks: mark conversion requests @@ -56,6 +57,7 @@ nonce=@t =stats =watches + code=* agent=(each agent vase) =beak marks=(map duct mark) @@ -128,6 +130,7 @@ nonce=@t =stats =watches + code=~ old-state=[%| vase] =beak marks=(map duct mark) @@ -199,8 +202,11 @@ ~> %slog.[0 leaf+"gall: {tex} {}"] :: ?^ yak + ?: &(=(q.beak.u.yak q.bek) =(code.u.yak agent) =(-.agent.u.yak &)) + mo-core + :: =. yokes.state - (~(put by yokes.state) dap u.yak(beak bek)) + (~(put by yokes.state) dap u.yak(beak bek, code agent)) =/ ap-core (ap-abed:ap dap `our) =. ap-core (ap-reinstall:ap-core agent) =. mo-core ap-abet:ap-core @@ -211,6 +217,7 @@ %* . *yoke control-duct hen beak bek + code agent agent &+agent nonce (scot %uw (end 5 (shas %yoke-nonce eny))) == @@ -1537,6 +1544,7 @@ :: :: removed live :: changed old-state from (each vase vase) to [%| vase] + :: added code :: ++ spore-8-to-9 |= old=spore-8 @@ -1546,7 +1554,8 @@ eggs %- ~(urn by eggs.old) |= [a=term e=egg-8] - e(|2 |3.e(old-state [%| p.old-state.e])) + ^- egg + e(|2 |3.e(|2 `|5.e(old-state [%| p.old-state.e]))) == -- :: +scry: standard scry @@ -1635,6 +1644,7 @@ |= =yoke ^- egg %= yoke + code ~ agent :- %| ?: ?=(%| -.agent.yoke)