1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 09:44:38 +02:00

Upgrade core to have lazy-loading option for Fields, Templates, Fieldgroups. Collaboration with @thetuningspoon for boot performance improvement on installations with large quantities of fields/templates/fieldgroups. Lazy loading option is enabled by default but can be disabled by setting $config->useLazyLoading=false; in your /site/config.php file.

Co-authored-by: thetuningspoon <mspooner@hey.com>
This commit is contained in:
Ryan Cramer
2022-02-04 14:51:11 -05:00
parent 9a1cf64e02
commit a5c70a4e7d
16 changed files with 1232 additions and 329 deletions

View File

@@ -12,7 +12,7 @@
* You may also make up your own configuration options by assigning them
* in /site/config.php
*
* ProcessWire 3.x, Copyright 2016 by Ryan Cramer
* ProcessWire 3.x, Copyright 2022 by Ryan Cramer
* https://processwire.com
*
*
@@ -76,12 +76,15 @@ $config->debugIf = '';
/**
* Tools, and their order, to show in debug mode (admin)
*
* Options include: pages, api, session, modules, hooks, database, db, timers, user, input, cache, autoload
* Options include: pages, api, session, modules, hooks, database, db, timers, user, input, cache, autoload, lazyload
*
* Note: when used, lazyload option should be placed first beause its results can be affected by later debug tools.
*
* @var array
*
*/
$config->debugTools = array(
//'lazyload',
'pages',
'api',
'session',
@@ -194,6 +197,23 @@ $config->useMarkupRegions = false;
*/
$config->usePageClasses = false;
/**
* Use lazy loading of fields (plus templates and fieldgroups) for faster boot times?
*
* This delays loading of fields, templates and fieldgroups until they are requested.
* This can improve performance on systems with hundreds of fields or templates, as
* individual fields, templates/fieldgroups won't get constructed until they are needed.
*
* Specify `true` to use lazy loading for all types, `false` to disable all lazy loading,
* or specify array with one or more of the following for lazy loading only certain types:
* `[ 'fields', 'templates', 'fieldgroups' ]`
*
* @var bool|array
* @since 3.0.194
*
*/
$config->useLazyLoading = true;
/**
* Disable all HTTPS requirements?
*