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
F15199422: D19223.diff
Sun, Feb 23, 8:38 AM
Unknown Object (File)
Thu, Feb 20, 4:51 PM
Unknown Object (File)
Thu, Feb 20, 4:51 PM
Unknown Object (File)
Thu, Feb 20, 4:51 PM
Unknown Object (File)
Thu, Feb 20, 4:51 PM
Unknown Object (File)
Tue, Feb 18, 2:47 PM
Unknown Object (File)
Tue, Feb 18, 2:28 AM
Unknown Object (File)
Sat, Feb 15, 10:29 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
Branch
perf4
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 19845
Build 26892: Run Core Tests
Build 26891: arc lint + arc unit