Page MenuHomePhabricator

Consider support for constants/static variables
Open, LowPublicFeature


More often than not, the variables used on a page are never changed after first being defined. We should look at whether there are any efficiency gains to be had by supporting constant or static variables.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 19 2019, 2:46 PM
MGChecker added a subscriber: MGChecker.

While the idea is nice, I doubt there will be measureable performance improvements. Variables are already quite lightweight (maybe except var_final), especially in comparison to the other parser code.

This doesn't surprise me, but I don't have the familiarity with the code to have said one way or the other.

MGChecker changed the subtype of this task from "Task" to "Feature Request".Apr 19 2019, 11:02 PM

What could be interesting is combining this proppsal with T207649, as these would behave nearly identical to template arguments (immutable and local).This kind of Variables might be compatible with Parsoid, which will be replacing the current Parser sooner or later.

MGChecker triaged this task as Low priority.Apr 20 2019, 2:44 AM