@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove gravatar support

Summary: Fixes T6261. The performance of asking gravatar for these images is horrible and causing lots of people to have issues with the page.

Test Plan: noted how wildly fast the edit profile picture page loaded

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6261

Differential Revision: https://secure.phabricator.com/D10724

-45
-45
src/applications/people/controller/PhabricatorPeopleProfilePictureController.php
··· 156 156 } 157 157 } 158 158 159 - // Try to add Gravatar images for any email addresses associated with the 160 - // account. 161 - if (PhabricatorEnv::getEnvConfig('security.allow-outbound-http')) { 162 - $emails = id(new PhabricatorUserEmail())->loadAllWhere( 163 - 'userPHID = %s ORDER BY address', 164 - $user->getPHID()); 165 - 166 - $futures = array(); 167 - foreach ($emails as $email_object) { 168 - $email = $email_object->getAddress(); 169 - 170 - $hash = md5(strtolower(trim($email))); 171 - $uri = id(new PhutilURI("https://secure.gravatar.com/avatar/{$hash}")) 172 - ->setQueryParams( 173 - array( 174 - 'size' => 200, 175 - 'default' => '404', 176 - 'rating' => 'x', 177 - )); 178 - $futures[$email] = new HTTPSFuture($uri); 179 - } 180 - 181 - $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); 182 - foreach (Futures($futures) as $email => $future) { 183 - try { 184 - list($body) = $future->resolvex(); 185 - $file = PhabricatorFile::newFromFileData( 186 - $body, 187 - array( 188 - 'name' => 'profile-gravatar', 189 - 'ttl' => (60 * 60 * 4), 190 - )); 191 - if ($file->isTransformableImage()) { 192 - $images[$file->getPHID()] = array( 193 - 'uri' => $file->getBestURI(), 194 - 'tip' => pht('Gravatar for %s', $email), 195 - ); 196 - } 197 - } catch (Exception $ex) { 198 - // Just continue. 199 - } 200 - } 201 - unset($unguarded); 202 - } 203 - 204 159 $images[PhabricatorPHIDConstants::PHID_VOID] = array( 205 160 'uri' => $default_image->getBestURI(), 206 161 'tip' => pht('Default Picture'),