Improve federated avatars DNS lookups #522

Closed
opened 2025-11-02 03:26:37 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @strk on GitHub (Mar 16, 2017).

At the moment enabling FEDERATED_AVATARS results in some delays whenever the server has to provide the URL to the avatar of users whose federated avatar url is not found in the ad-hoc cache (which has 1 day of lifetime).

While this may not be a big deal in a page with a single user, explore/users page can show many users and if these have emails with many different domains the delay sums up until browser possibly times out.

The situation may be improved in various ways:

  1. Make sure multiple thread asking for the same domain lookup all queue so that a single lookup is ever performed (but I'd think the operating system should already being taking care of this)
  2. Always perform the lookup in the background and save the result in db tables

In any case it would be useful to document the problem with the setting that enables these.

Originally created by @strk on GitHub (Mar 16, 2017). At the moment enabling FEDERATED_AVATARS results in some delays whenever the server has to provide the URL to the avatar of users whose federated avatar url is not found in the ad-hoc cache (which has 1 day of lifetime). While this may not be a big deal in a page with a single user, explore/users page can show many users and if these have emails with many different domains the delay sums up until browser possibly times out. The situation may be improved in various ways: 1. Make sure multiple thread asking for the same domain lookup all queue so that a single lookup is ever performed (but I'd think the operating system should already being taking care of this) 2. Always perform the lookup in the background and save the result in db tables In any case it would be useful to document the problem with the setting that enables these.
GiteaMirror added the type/enhancementissue/stale labels 2025-11-02 03:26:37 -06:00
Author
Owner

@stale[bot] commented on GitHub (Feb 16, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Feb 16, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Mar 2, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Mar 2, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#522