Hi @Yuki Kishimoto . I'm wondering if it's fine to use `.clone()` for the `client` instance whenever I need to use it?
I noticed that when I enabled <gossip>, there's a huge delay in receiving events after subscribing. However, it works fine if I keep <gossip> disabled. I thought `.clone()` might be affecting this, but I'm not sure, so I ended up implementing my own gossip mechanism for my app.
Login to reply
Replies (2)
No, clone doesn't affect that, it's fine to use it. Have you tried the SQLite gossip storage, instead of the in-memory one?
@reya in addition to the SQLite gossip store, also this PR should help:
If you have the opportunity to test it, let me know if it's faster.
GitHub
sdk: improve gossip concurrency with per-key semaphore system by yukibtc · Pull Request #1250 · rust-nostr/nostr
Replace the global single-permit semaphore with a per-key semaphore, improving updates concurrency.
Add unit tests to ensure the system is deadlock...