Page MenuHomePhabricator

Add a total run time limit to AbuseFilter
Open, MediumPublic


Right now, the abuse filter uses a "condition limit" which measures the complexity of the expressions that it is asked to evaluate, but not the difficulty in doing so. A complex regex can consume the same number of conditions as a trivial equivalence test, but take 100 times longer to evaluate. As a result, the current condition limit is only weakly connected to overall performance.

I propose to add a total run time limit to the Abuse Filter as a more practical measure of performance / complexity. It is hard to know what an appropriate limit is because we don't currently track total filter run time in a systematic way, but my guess is that a limit of 1-2 seconds will more than accommodate the existing filter sets applied to edits (with the typical run time being substantially less than 1 second).

Given a reasonable run time limit, it would probably also make sense to remove or greatly increase the condition limit, so that the run time limit is the primary constraint on the number of allowed filters.

Event Timeline

Dragons_flight raised the priority of this task from to Medium.
Dragons_flight updated the task description. (Show Details)
Dragons_flight added a project: AbuseFilter.
Dragons_flight added a subscriber: Dragons_flight.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 25 2015, 1:08 AM
Dalba added a subscriber: Dalba.Apr 9 2016, 7:34 AM
Zache added a subscriber: Zache.Sep 27 2016, 2:20 PM
He7d3r added a subscriber: He7d3r.Nov 28 2016, 11:10 AM