mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-02 07:06:41 +03:00
contact-push-hook: speed up asymptotics by only doing a fixed number of scries
This commit is contained in:
parent
38ac5f191f
commit
d5457e3cf5
@ -94,16 +94,18 @@
|
|||||||
++ rolo
|
++ rolo
|
||||||
^- rolodex:store
|
^- rolodex:store
|
||||||
=/ ugroup (scry-group:grp resource)
|
=/ ugroup (scry-group:grp resource)
|
||||||
|
=/ =rolodex:store
|
||||||
|
(scry-for:con rolodex:store /all)
|
||||||
%- ~(gas by *rolodex:store)
|
%- ~(gas by *rolodex:store)
|
||||||
?~ ugroup
|
?~ ugroup
|
||||||
=/ c=(unit contact:store) (get-contact:con our.bowl)
|
=/ c=(unit contact:store) (~(get by rolodex) our.bowl)
|
||||||
?~ c
|
?~ c
|
||||||
[our.bowl *contact:store]~
|
[our.bowl *contact:store]~
|
||||||
[our.bowl u.c]~
|
[our.bowl u.c]~
|
||||||
%+ murn ~(tap in (members:grp resource))
|
%+ murn ~(tap in (members:grp resource))
|
||||||
|= s=ship
|
|= s=ship
|
||||||
^- (unit [ship contact:store])
|
^- (unit [ship contact:store])
|
||||||
=/ c=(unit contact:store) (get-contact:con s)
|
=/ c=(unit contact:store) (~(get by rolodex) s)
|
||||||
?~(c ~ `[s u.c])
|
?~(c ~ `[s u.c])
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
|
Loading…
Reference in New Issue
Block a user