How to handle a large child theme

I assume this will be a lot of extra load on the site to have all these extra files? Or are the parent theme files “skipped” and “doesn’t count” if I have them in my child theme?

  • if the child theme file is slower than the parent theme file then yes
  • if the child theme file is faster than the parent theme file then no

Themes aren’t slow because they’re big or small, just as sites aren’t slow because the number of plugins is high or low.

Sites are slow because they’re trying to do either too many things, or expensive things. You could built a tiny theme that is very very slow, or a very large theme that is fast because everything it does is well built and simple.

What matters is the cost of the files that actually run.

Note that child themes can only replace theme templates that are loaded via locate_template and get_template_part. PHP files included via functions.php or with require/include can’t be replaced this way and are still loaded and add additional weight.

If you end up copying all the templates from the parent theme to the child theme and modifying them, this on its own won’t cause additional performance problems, it will likely run just as slow as the parent theme on its own plus whatever tweaks you made in the childs functions.php.

Wether your site slows down or speeds up is entirely dependent on the contents of those files. The number of files in total is not relevant.

The pedantic answer

To get a slowdown you would need to massively inflate the number of PHP files to the hundreds of MB, and load them all at once regardless of the page. This is because it takes time to load things off of storage and parse the PHP. Normally this is inconsequential but if you scale things up it eventually becomes noticeable. Getting to that point is quite difficult, especially on solid state storage.

You should expect to see some performance drops related to scanning for page templates in some circumstances, but I doubt that will affect frontend performance. The biggest issue to you as an admin is most likely to be the HTML of the dropdown that lists them.

Loading theme templates from a child theme via locate_template and get_template_part shouldn’t see a slowdown as get_template part will at maximum check for the presence of 4 files when given 2 parameters.

The TLDR answer

This is not a question you need to ask, it isn’t worth worrying about, and it’s very deep in the realm of micro-optimisation. If you have any common debug plugin you can directly test and see for yourself.