Skip to content
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

Roster load storm on startup #37

Closed
valeriansaliou opened this issue Jan 29, 2024 · 5 comments
Closed

Roster load storm on startup #37

valeriansaliou opened this issue Jan 29, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@valeriansaliou
Copy link
Member

valeriansaliou commented Jan 29, 2024

When the Prose app starts, I receive multiple contactChanged and roomsChanged events, leading to local roster invalidation and reload. This ultimately leads to the app requesting the roster multiple times to the server in parallel.

  • Is there any issue where I am receiving those delegate events from the core client more than I should?
  • Or should this be handled in the application, eg. by debouncing the load or changing the roster reload mechanics, eg. not reloading on those events and completely de-correlating the roster from those events?
  • Would that have any impact on rooms?

Those screenshots show the event/stanza storm on startup, which happen in a second or so:

image
image

@valeriansaliou valeriansaliou added the bug Something isn't working label Jan 29, 2024
@valeriansaliou
Copy link
Member Author

Poke @nesium

@nesium
Copy link
Contributor

nesium commented Jan 29, 2024

I had that on my list for a while. I'll give it a go. Would like to handle it in the core.

@valeriansaliou
Copy link
Member Author

Perfect, sounds good yes!

@valeriansaliou
Copy link
Member Author

I think that ideally the roster should be loaded once by the core, and and then maintained w/ roster pushes from the server. Calling load roster on the app's side would not load the roster from the server if called a second time, rather return storage-backed roster data.

@nesium
Copy link
Contributor

nesium commented Feb 5, 2024

Events are now throttled and coalesced. Please note the slight change in the delegate signature:

Screenshot 2024-02-05 at 19 32 56

Edit: Messed up the link in the commit message (prose-im/prose-core-client@fb1f7f2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants