[wp-trac] [WordPress Trac] #36335: Next generation: core autoloader proposal
WordPress Trac
noreply at wordpress.org
Sat Sep 24 15:26:22 UTC 2016
#36335: Next generation: core autoloader proposal
-----------------------------+------------------
Reporter: dnaber-de | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 4.7
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-----------------------------+------------------
Comment (by TJNowell):
I believe I've been misinterpreted by both sides regarding performance.
It's not wether autoloader X or autoloader Y is faster. It's wether
autoloading vs no autoloading is faster.
Right now, with no optimisations autoloading slows down WordPress due to
the greater number of files being loaded. It's a small difference but we
won't get an autoloader if it slows down core. We need to demonstrate with
hard facts that an improvement is possible. Right now all we have is
theoretical, and a number of senior developers have already chimed in with
that's not good enough.
I'd also like to raise some questions:
- I don't understand why we need to rearrange most of core, this sounds
like a recipe for disaster and failed auto-updates. It screams fragile
- I don't see why we need to rename our files, the part were we find the
classes and their filenames is meant to happen at buildtime, it's just a
PHP array `'class' => 'filename'`, why overcomplicate things?
- There may be things we don't want to autoload that are always loaded,
or too critical to let a plugin override
- Nobody has ruled out the composer autoloader, discussion on wether it
should be used is premature as the case for an autoloader has not been
made
As for benchmarks, install Query Monitor and run a vanilla install with
and without these changes, and measure 10 common page loads 10 times. That
should give crude timings. Better yet use a cli tool
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36335#comment:218>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list