<p>It shouldn't be that slow to bootstrap, but even if you're not doing anything with the plugins in your template, they are still loaded and instantiated with every request.</p>

<p>If I were you, I'd do some profiling with Blackfire or NewRelic to see what's really going on.</p>

CC BY-SA 3.0
2017-11-08T15:53:33.243Z
That's what I'm thinking is the issue. We essentially have an entire PHP application that is built inside CraftCMS plugins. I'm thinking the plugins are too massive/plentiful for craft to bootstrap quickly. I'm already in the process of breaking this code out of the CMS so that should confirm this idea in the next few weeks!
Exziled
CC BY-SA 3.0
2017-11-07T18:04:38.243Z
2017-11-07T18:04:38.243Z
andrew.welch
<p>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.</p>

<p>I'm assuming this is just some setting we're missing and/or our Craft installation is doing too much for one app.</p>

<p>I changed the _layout.html to this:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
    &lt;title&gt;TESTING&lt;/title&gt;

    &lt;meta charset="utf-8" /&gt;
    &lt;meta http-equiv="X-UA-Compatible" content="IE=Edge" /&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" /&gt;
&lt;/head&gt;

&lt;body id="body"&gt;
    &lt;!-- View container--&gt;
    &lt;div class="view-container" id="main-view-container"&gt;
        &lt;h1&gt;TESTING IN THE BODY&lt;/h1&gt;
    &lt;/div&gt;
&lt;/body&gt;
</code></pre>

<p></p>

<p>Not much going on there. However, this is still taking 500-600ms to bootstrap. This is my general.php file --</p>

<pre><code>&lt;?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 &amp; ~E_STRICT &amp; ~E_NOTICE &amp; ~E_DEPRECATED); 
    ini_set('display_errors', 0);
} else if (Craft\SayEnvironment::isDemo()) {
    error_reporting(E_ALL &amp; ~E_STRICT &amp; ~E_WARNING);
    ini_set('display_errors', 0); //don't display errors to console in demo
}

return array(

//////////////////////////
///  Default Settings  ///
//////////////////////////
'*' =&gt; array(
    'useCompressedJs' =&gt; false,
    'appId' =&gt; 'myappid',
    'validationKey' =&gt; 'asdfasfdasdfasdfasfasd',
    'timezone' =&gt; 'America/Chicago',
    'omitScriptNameInUrls' =&gt; true,
    'generateTransformsBeforePageLoad' =&gt; true,
    'maxUploadFileSize' =&gt; 33554432,
    'phpMaxMemoryLimit' =&gt; '512M',
    'slugWordSeparator' =&gt; '-',
    'enableCsrfProtection' =&gt; true,
    'devMode' =&gt; false
),

////////////////////////
//  Local Overrides  ///
////////////////////////
'localhost' =&gt; array(
    'cacheMethod' =&gt; 'file',
    'overridePhpSessionLocation' =&gt; false,
    'environmentVariables' =&gt; array(
        'siteUrl' =&gt; 'https://localhost/'
    )
)
</code></pre>

<p>);</p>

<p>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?</p>

<bootstrap-craft><speed>
Craft 2.6 slow bootstrapping?
# Craft 2.6 slow bootstrapping?

(Asked by: username_0 on 2017-11-07)

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:



    TESTING

    
    
    



    
    
        TESTING IN THE BODY
    



Not much going on there. However, this is still taking 500-600ms to bootstrap. This is my general.php file --
 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?

**Tags:** bootstrap-craft, speed


---

## 1 answers

### Answer by username_1 on 2017-11-07. Score: 2 | Accepted answer

It shouldn't be that slow to bootstrap, but even if you're not doing anything with the plugins in your template, they are still loaded and instantiated with every request.

If I were you, I'd do some profiling with Blackfire or NewRelic to see what's really going on.

> **Comments:**
> **username_0**: That's what I'm thinking is the issue. We essentially have an entire PHP application that is built inside CraftCMS plugins. I'm thinking the plugins are too massive/plentiful for craft to bootstrap quickly. I'm already in the process of breaking this code out of the CMS so that should confirm this idea in the next few weeks!  

---

