HomePhorge

Remove massive "rule applied" query

Description

Remove massive "rule applied" query

Summary:
Herald rules may be marked as "one-time". We track this by writing a row with
<ruleID, phid> when we apply a rule.

However, the current test for rule application involves loading every <ruleID,
*> pair. We also always write this row even for rules which are not one-time, so
if there are 100 rules, we'll load 1,000,000 rows after processing 10,000
objects.

Instead, load only the <phid, *> pairs, which are guaranteed to be bounded to at
most the number of rules.

I'll follow up with a diff that causes us to write rows only for one-time rules,
and deletes all historic rows which are not associated with one-time rules.

Test Plan:
Grepped for callsites to loadAllByContentTypeWithFullData(). Ran
rules in test console.

Reviewers: nh, btrahan, jungejason

Reviewed By: nh

CC: aran, epriestley

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

Details

Provenance
epriestleyAuthored on Jan 24 2012, 7:03 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP067c7f8a74d1: Display links to editor in Differential and Diffusion
Branches
Unknown
Tags
Unknown

Event Timeline