[buddypress-trac] [BuddyPress Trac] #6853: Autoload BP classes
buddypress-trac
noreply at wordpress.org
Fri Feb 5 06:43:02 UTC 2016
#6853: Autoload BP classes
--------------------------+------------------
Reporter: boonebgorges | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.5
Component: API | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------
Comment (by boonebgorges):
[attachment:6853.2.diff] is an updated patch, after the moves in #6870. I
made the necessary additions to `$irregular_map`, and wrapped all new
`require` statements in a `do_autoload` check.
Rough benchmarks are showing a pretty consistent memory savings of between
1.5 and 2MB, on a local dev installation that has about a zillion plugins
running. On a front-end load, memory usage goes from just under 50MB to
just over 48MB. If we assume that, say, half of that 50MB is directly
attributable to BuddyPress, then we're reducing BP's memory footprint by 7
or 8 percent with autoloading. And with some further rearrangement in the
future (so that components are loaded in a sleeker way) we could get that
number down even further.
Comments and feedback are welcome on the technique used. And if anyone
sees any gotchas that I'm missing, please speak up. It'd be nifty to put
sneak this into 2.5.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6853#comment:11>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list