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

Raise for all teams: use display name cache #33589

Closed
nickvergessen opened this issue Aug 18, 2022 · 4 comments
Closed

Raise for all teams: use display name cache #33589

nickvergessen opened this issue Aug 18, 2022 · 4 comments

Comments

@nickvergessen
Copy link
Member

  • Activity providers
  • Notification providers
  • spreed/lib/Chat/Parser/UserMention.php 94
  • comments mentions
  • apps/user_status/lib/Dashboard/UserStatusWidget.php
@nickvergessen
Copy link
Member Author

nickvergessen commented Aug 18, 2022

IUserManager::getDisplayName is a heavily cached method. When only the display name of a user is required. It reduces roughly 1-2 query per existing user backend database queries.

The method is new in 25, so when the minimum version of the app allows it please use this. Prime examples as per above are rendering activities and notifications and similar things.

Please raise for your teams and apps:

@PVince81
Copy link
Member

does LazyUser also count as display name cache ? because I saw a bunch of PRs from @icewind1991 for using that as well

@nickvergessen
Copy link
Member Author

Yes, LazyUser uses the cache iirc

@nickvergessen
Copy link
Member Author

@PVince81 shall we close as all teams reacted? You can create a follow up for server if you think it makes sense, but a generic ticket for server is probably also not helpful and fixes must be applied once a spot is found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants