#5938 - Refactor core Comcode and Tempcode symbols into hooks

  • By
  • Added
  • 5 views
Identifier #5938
Issue type Feature request or suggestion
Title Refactor core Comcode and Tempcode symbols into hooks
Status Open
Tags

Roadmap: Over the horizon (custom)

Handling member Deleted
Addon core
Description Core Comcode tags and Tempcode symbols exist within source files.

Refactor these out of the source files into appropriate hooks. The advantages include the following:

1. Saves on memory (in most cases) - We only load up code for tags and symbols that we are going to use*
2. Allows for easier overriding with custom code / addons for changing functionality (e.g. an addon which rewrites external URLs to an internal redirect URL that displays a warning / confirmation about proceeding to an external site)
3. Current core tags and symbols can be remapped to their appropriate bundled addon instead of them all being core

*Hooks are classes which by nature take up more memory. But we can optimise by only loading the hooks on-demand, and by unsetting the hooks when no longer needed (though this comes at a performance cost if the hook might be needed down the road; perhaps the hook can define a property "is_commonly_used", and if true, will not be unloaded after use [ecv_ symbols would have this true and ecv2_ ones false, for example])
Steps to reproduce

Additional information We should also remove ecv_* and ecv2_* functionality once this is done; won't be necessary if all Tempcode symbols will be hooks.
Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated