Perf/reorganize autoloading - #62231
Conversation
This leverages opcache to be as fast as possible. Can be used for autoloading class maps, but also for other kind of pre-computed cached arrays (routes, occ commands, …). Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
The idea is to cache to disk a static classmap with all classes from core and applications. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
cachedirectory still needs to be added to config.sample.php Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
There was a weird inconsistent mix of Test\, Tests\lib, Test\Core, Tests\Core and Core\. Now there is only Test\ for tests/lib/ and Tests\Core for tests/Core. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
|
(I'm very hesitant about this approach but don't really know how to formulate my reasoning, but leaving a note for a soft-disagreement until I can better word things or change my mind) |
Is your disagreement with the PhpDumpCache API or the autoloader change? I did the PhpDumpCache part that way because I would like to re-use it for other things, notably caching commands as in this draft: #61865 |
Summary
The idea here is to have only one autoloader instead of one by application, with a cached classmap in a PHP file.
On a test instance (debug mode on) I get 500ms instead of 600ms to run
occ status.The cached array in PHP file mechanism could be leveraged for other optimizations.
TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)