Page MenuHomePhabricator

Skip loading attached objects for files when we know the file is visible
ClosedPublic

Authored by epriestley on Mar 14 2018, 6:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 11 2024, 12:30 AM
Unknown Object (File)
Feb 3 2024, 6:28 PM
Unknown Object (File)
Jan 9 2024, 1:50 AM
Unknown Object (File)
Dec 24 2023, 12:22 PM
Unknown Object (File)
Dec 19 2023, 12:40 AM
Unknown Object (File)
Nov 30 2023, 12:42 AM
Unknown Object (File)
Nov 15 2023, 9:09 AM
Unknown Object (File)
Nov 4 2023, 10:00 PM
Subscribers
None

Details

Summary

Depends on D19222. Ref T13106. We currently execute an edge query (and possibly an object query) when loading builtin files, but this is never necessary because we know these files are always visible.

Instead, skip this logic for builtin files and profile image files; these files have global visibility and will never get a different policy result because of file attachment information.

(In theory, we could additionally skip this for files with the most open visibility policy or some other trivially visible policy like the user's PHID, but we do actually care about the attachment data some of the time.)

Test Plan

Saw queries drop from 151 to 145 on local test page. Checked file attachment data in Files, saw it still working correctly.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable