-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delay during message sending #1465
Comments
I did some investigations and can confirm the above. Test 1:it.only("test", async function () {
this.timeout(150_000);
const waku = await createLightNode({
defaultBootstrap: true,
});
while (true) {
if ((await waku.lightPush.peers()).length <= 0) {
console.log("No peers, waiting");
await delay(1000);
continue;
}
console.time("encoder creation");
const encoder = createEncoder({
contentTopic: TestContentTopic,
});
console.timeEnd("encoder creation");
console.time("lightpush send");
await waku.lightPush.send(encoder, {
payload: utf8ToBytes("yoyoyo"),
});
console.timeEnd("lightpush send");
}
}); Results
Test 2:it.only("test", async function () {
this.timeout(150_000);
const waku = await createLightNode();
await waku.dial(
multiaddr("/dns4/node-01.ac-cn-hongkong-c.wakuv2.test.statusim.net/tcp/8000/wss/p2p/16Uiu2HAkvWiyFsgRhuJEb9JfjYxEkoHLgnUQmr1N5mKWnYjxYRVm") Results:
Test 3:added logs within js-waku's lightpush implementation Results:
Test 4:using a locally run nwaku node Results:
Analysis:
|
Interesting, I'd probably engage some discussion with libp2p team. Let's reach out to nim-libp2p first see if they have any insights on this. Also, when sending a message, we create the stream lazily. One approach would be to create a stream for all protocols as soon as we connect (b), so it can be skipped when sending the message.
Now, regarding the poor performance of |
https://discord.com/channels/864066763682218004/1140501637232857141/1140638224939757598 Reply from nim-libp2p team (Vac discord)
My response:
|
FYI, tracking it under #1453 |
I suggest we also track to long term actions re multistream optimist selection:
another missing medium term item would be review performance of |
|
confirmed that optimistic multistream select exists in
@weboko are you happy to track this perhaps part of existing testing epics you're doing if you see they fit, else a new issue? sub-tasks for this issue have either been merged or tracked in new issues -- @weboko pls feel free to close this issue once the above performance testing task is tracked |
Closing as rest will be tracked here - #1521 |
Tasks for the following issue:
This is a support request
Problem
Hi, I am using the js sdk in browser, with filter protocol and light push (based on the example https://github.com/waku-org/js-waku-examples/tree/master/examples/light-js ).
I am timing the delay for sending the message, here:
The results on running multiple times:
How can I reduce this delay? Is there other setup that would be more useful for low latency usecase?
The text was updated successfully, but these errors were encountered: