#4311 - Make Tempcode use SPL, for reduced memory usage

Identifier #4311
Issue type Feature request or suggestion
Title Make Tempcode use SPL, for reduced memory usage
Status Closed (rejected)
Tags

Type: Performance (custom)

Handling member Chris Graham
Addon core
Description Tempcode will use significantly reduced memory if we switch from arrays to SPL's alternative efficient list mechanisms: SplDoublyLinkedList and SplFixedArray. The very flexible nature of PHP arrays means they use an incredible amount of memory, and Tempcode is built heavily around use of arrays. The SPL structures use a lot less because they are not supersets of every kind of list/map a programmer may ever want.

SPL is available in all PHP installs since IIRC PHP 5.4 and cannot be removed, so we can use it without problems.

I have a patch for this that I am attaching, which was built against v10.

The problem is it is a major compat break with any Tempcode that is already compiled. We've done this before, as Tempcode was rewritten over the years, but now Tempcode caching for content Comcode is individually stored in each content table, we cannot just flush a single table to have it regenerate.
Steps to reproduce

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