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.
Description
Description
Related Objects
Related Objects
- Mentioned In
- T207649: Provide a mechanism for scoping Variables
- Mentioned Here
- T207649: Provide a mechanism for scoping Variables
Event Timeline
Comment Actions
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.
Comment Actions
This doesn't surprise me, but I don't have the familiarity with the code to have said one way or the other.
Comment Actions
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.