mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 21:40:55 +01:00
No description
58884b94dc
Summary: Currently, when querying for responsible users (revisions where a given user is either the author or a reviewer), we do this: - If the query passes a bunch of hard-coded special cases, use a special hard-coded UNION. - Otherwise, use a very complicated JOIN/WHERE clause. This is bad for several reasons: - Tons and tons of hard-coding and special casing. - The JOIN/WHERE clause performs very poorly for large datasets. - (As a material consequence, the homepage issues a responsible query which barely misses the hard-coded special cases and goes down the slow path.) Instead, //always// use the UNION strategy to execute a "responsible" query. Specifically, if we have responsible PHIDs, temporarily add them to the author list and build a normal query, then repeat for reviewers, then UNION any clauses we built. Fixes T3377. Ref T603. Ref T2625. Depends on D6342. There's various folklore about UNION ALL / UNION DISTINCT performance. UNION DISTINCT is simpler here and the number of rows is small, although we could use UNION ALL in the form: SELECT * FROM ((SELECT ...) UNION ALL (SELECT ...) ORDER) GROUP LIMIT ...if we find that there's some performance benefit at some point. Test Plan: Used DarkConsole to examine queries. Viewed home page and Differential dashboard/authors/subscribers. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T603, T2625, T3377 Differential Revision: https://secure.phabricator.com/D6343 |
||
---|---|---|
bin | ||
conf | ||
externals | ||
resources | ||
scripts | ||
src | ||
support | ||
webroot | ||
.arcconfig | ||
.divinerconfig | ||
.editorconfig | ||
.gitignore | ||
LICENSE | ||
NOTICE | ||
README |
Phabricator is an open source collection of web applications which make it easier to write, review, and share source code. Phabricator was developed at Facebook. This is an early release. It's pretty high-quality and usable, but under active development so things may change quickly. You can learn more about the project and find links to documentation and resources at: http://phabricator.org/ LICENSE Phabricator is released under the Apache 2.0 license except as otherwise noted.