Page MenuHomePhabricator

enable variable old_html and old_text
Closed, DeclinedPublic

Assigned To
None
Authored By
Nemo_bis
Jan 10 2010, 8:11 PM
Referenced Files
None
Tokens
"Orange Medal" token, awarded by Liuxinyu970226."Cookie" token, awarded by whym."Orange Medal" token, awarded by Dalba.

Description

It would be useful to be able to use the variable old_html in AbuseFilter on Wikimedia wikis (specifically, it.wikiquote): old_html is currently calculated (see e.g. [[Special:AbuseFilter/examine/log/1864098]]), but if you try to use it in a filter you get the error: «Syntax error detected: Unrecognised variable old_html».
I suppose this is a wanted behaviour to reduce resources consumption, but I file this bug as a placeholder/reminder.

Details

Reference
bz22075

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:55 PM
bzimport set Reference to bz22075.
bzimport added a subscriber: Unknown Object (MLST).
  • Bug 24310 has been marked as a duplicate of this bug. ***
  • Bug 23027 has been marked as a duplicate of this bug. ***

Looking at AbuseFilter.class.php, those two variables are commented out with the note "Disabled, performance".

We could add a new preference option ($wgAbuseFilterOldVariables) which could be used to then enable them on a per-wiki basis?

I'll look to see if I can find any discussion on why they were disabled.

It requires reparsing the old text, which in some cases can take tens of seconds. Of course, the old text has already been parsed at some point, but some engineering is needed to actually retrieve this parsed HTML from the appropriate cache.

Krinkle removed a project: Performance Issue.
Krinkle set Security to None.
Huji subscribed.

It would require parsing the old text, which would be slow, therefore it is going to severely impact efficiency of filters. Harms outweigh benefits.

It would require parsing the old text, which would be slow

The HTML of the "old" text is in fact the current HTML when the filters are run, isn't it?

Slowness can be excessive in general but there are cases where this should be possible to configure. For instance, isn't RESTBase supposed to provide cached HTML for revisions on Wikimedia wikis? If the solution were to be very special-based I can understand it would be very low priority.