Homec4science

Don't try to load user profile images in PhabricatorPeopleQuery if no users…

Authored by epriestley <git@epriestley.com> on Sep 8 2013, 18:43.

Description

Don't try to load user profile images in PhabricatorPeopleQuery if no users have any

Summary:
Fixes T3810. In PhabricatorPeopleQuery, we issue an unnecessary query like this:

SELECT f.* FROM file f WHERE (f.phid IN ('')) ORDER BY f.id DESC

...if we're loading a user without a profile picture. Filter the file PHIDs before loading them to prevent this.

This doesn't change anything, but saves us a spurious/silly query.

Also makes PhabricatorPeopleProfileController use needProfileImage(), moving us closer to getting rid of loadProfileImageURI() eventually.

Test Plan: Looked at profiles of users with and without profile pictures. Checked query log in DarkConsole.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T3810

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

Details

Committed
epriestley <git@epriestley.com>Sep 8 2013, 18:43
Pushed
aubortJan 31 2017, 17:16
Parents
rPH194245ed622d: Clean up some more Diviner stuff
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHd1225e782b0e: Don't try to load user profile images in PhabricatorPeopleQuery if no users… (authored by epriestley <git@epriestley.com>).Sep 8 2013, 18:43