WordPress.org

Make WordPress Core

Changes between Initial Version and Version 5 of Ticket #51691


Ignore:
Timestamp:
11/01/2020 07:36:48 PM (4 months ago)
Author:
hellofromTonya
Comment:

Modified the description to focus it on the performance objective, rather than the implementation itself. There are many ways to achieve the performance objective.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #51691

    • Property Type changed from task (blessed) to enhancement
  • Ticket #51691 – Description

    initial v5  
    1616- etc.
    1717
    18 This ticket proposes a performance gain for the bundled themes by:
     18This ticket proposes to call `get_template_directory()` only once for loading of theme's local files.
     19
     20There are different ways to achieve this a performance gain.
     21
     22One way:
    1923
    2024- replacing the `get_template_directory()` with a private memoized theme function
    2125- calling `get_template_directory()` only once and then storing it into a `static` variable for reuse within the private function
    2226
     27Another way:
     28- Store in a variable and reuse
    2329
    24 This change reduces memory, CPU cycles, and processing time.
     30Another way:
     31- Implement within Core
     32
     33
     34The overall goal is to improve performance by reducing memory, CPU cycles, and processing time.