[buddypress-trac] [BuddyPress Trac] #7666: Load template loop functions only when the template loop is initialized

buddypress-trac noreply at wordpress.org
Tue Jan 23 17:10:03 UTC 2018


#7666: Load template loop functions only when the template loop is initialized
------------------------------------+----------------------------------
 Reporter:  r-a-y                   |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Under Consideration
Component:  Core                    |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+----------------------------------

Comment (by r-a-y):

 My technique doesn't require new APIs.  It just uses a `require_once` line
 near the end of the loop.

 There shouldn't be a backward-compatibility issue unless developers use
 functions that are not meant to be used outside the loop.  We can try to
 be conservative with what is offshored though.

 It's hard to do benchmarks without writing a patch for the whole codebase,
 but it would save loading thousands of lines of code.  The example patch
 already saves more than 2000+ lines of code alone.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7666#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list