Skip to content
This repository was archived by the owner on Jan 25, 2025. It is now read-only.

Conversation

@Tenari
Copy link
Collaborator

@Tenari Tenari commented Oct 10, 2023

We are seeing extreme slowness with contact sharing of large numbers of contacts.
to setup, install the realm desk from this branch on both a fakezod and fakebus

on fake ~bus

:passport &passport-action [%toggle-hide-logs %.n]

on fake ~zod

> :passport &passport-action [%toggle-hide-logs %.n]
> -realm!make-fake-contacts 1.000
~wanlyn

setup is now complete. (recommend putting zod and bus terminals side by side to see simeltaneous logging output)

now to run the test do -realm!send-all-contacts ~bus from the zod dojo
will produce the following output:

>>> "starting send-all-contacts ~2023.10.10..22.10.16..42bb"
> -realm!send-all-contacts ~bus
'sent'

for me(m2 macbookpro, very powerful hardware compared to anything most real ships use), the initial printout happens very quickly, but the final 'sent' log takes almost a full minute to come back

on the fake~bus you will see:

"%receive-contacts: 1.000 contacts ~2023.10.10..22.10.17..e92d"
"%receive-contacts finished at ~2023.10.10..22.10.17..e92d "

very quickly/almost immediately, however, then there will be an <<ames>> spinner for that ~1minute wait before the zod command finishes with 'sent'
I assume this is waiting for the %poke-ack to come back?

my only theory about what is happening is that %receive-contacts is generating ~ 1 thousand cards and ames takes forever to process those? which obviously makes sense if it has to actually hit out to the network, but those cards the %receive-contacts poke is generating are only pokes into ~bus's own %bedrock agent. seems like pokes to yourself should be trivially fast and not have to be "slowed down" by ames?
I'm not sure what the deal is

@Tenari Tenari marked this pull request as draft October 10, 2023 22:09
@Tenari
Copy link
Collaborator Author

Tenari commented Oct 10, 2023

ok with that second commit here I got the speed on my macbook down to ~17 seconds. so about 70% reduction in time simply by grouping it into one large internal poke versus many small internal pokes

@niblyx-malnus
Copy link
Contributor

I think we could improve performance still further by consolidating the update cards sent out in response to the create-many poke, as it still accumulates and has to consider many individual effects (whether or not it actually does anything with them, for example I think even though no one is subscribing to the vent path, gall or arvo may still have to consider whether or not to send updates on the vent path for each card it has which asks it to do that).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants