Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Rewrite presence for performance. #582

Merged
merged 17 commits into from
Feb 19, 2016
Merged

Rewrite presence for performance. #582

merged 17 commits into from
Feb 19, 2016

Conversation

erikjohnston
Copy link
Member

  • Removes profile information from m.presence
  • The server idles out users.
  • Sending read receipts and typing bumps last active time.
  • While a user is online and their last_active_ago time remains below 1 minute, don't send updates to client. This is done by including a currently_active boolean field that when true indicates that clients should assume the user is only and active until further notice (i.e., their "last active" should be "now"). Clients will receive a new presence event when users stop being active.
  • Timeout non-offline states for remote users after 30mins
  • Persist the presence state across restarts

TODO:

  • Upload sytest branch
  • Fix unit tests.

for entry in self.entries:
# Add to first bucket we find. This should gracefully handle inserts
# for times in the past.
if entry.end_key >= then_key:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are no "gaps" in the in the entries list, then why do we need to scan to find the appropriate entry?
Could we simply index into the entry list instead?

)

if not allowed:
raise AuthError(403, "You are allowed to see their presence.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"You are not..."

@NegativeMjark
Copy link
Contributor

LGTM

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.

2 participants