For some reason when we're bootstrapping Craft CMS it's VERY slow to bootstrap (500ms) worth of slowness. This is utilizing HTTP2 and PHP7 so we're expecting it to be much faster than this.
I'm assuming this is just some setting we're missing and/or our Craft installation is doing too much for one app.
I changed the _layout.html to this:
<!DOCTYPE html>
<html lang="en">
<head>
<title>TESTING</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
</head>
<body id="body">
<!-- View container-->
<div class="view-container" id="main-view-container">
<h1>TESTING IN THE BODY</h1>
</div>
</body>
Not much going on there. However, this is still taking 500-600ms to bootstrap. This is my general.php file --
<?php
require __Dir__ . '/../../vendor/autoload.php';
require_once __Dir__ . '/../plugins/global/config/Environment.php';
//error reporting
if (Craft\Environment::isProduction()) {
//log all errors except for notices, strict php guidelines, etc
error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE & ~E_DEPRECATED);
ini_set('display_errors', 0);
} else if (Craft\SayEnvironment::isDemo()) {
error_reporting(E_ALL & ~E_STRICT & ~E_WARNING);
ini_set('display_errors', 0); //don't display errors to console in demo
}
return array(
//////////////////////////
/// Default Settings ///
//////////////////////////
'*' => array(
'useCompressedJs' => false,
'appId' => 'myappid',
'validationKey' => 'asdfasfdasdfasdfasfasd',
'timezone' => 'America/Chicago',
'omitScriptNameInUrls' => true,
'generateTransformsBeforePageLoad' => true,
'maxUploadFileSize' => 33554432,
'phpMaxMemoryLimit' => '512M',
'slugWordSeparator' => '-',
'enableCsrfProtection' => true,
'devMode' => false
),
////////////////////////
// Local Overrides ///
////////////////////////
'localhost' => array(
'cacheMethod' => 'file',
'overridePhpSessionLocation' => false,
'environmentVariables' => array(
'siteUrl' => 'https://localhost/'
)
)
);
Realistically all I'm asking Craft to do right now is bootstrap itself and load this _layout.html file. Any ideas why this implementation might be slow? We have 15-20 large plugins but we're not really doing anything with them in this instance?