I have a blog site that contains around 400 posts, plus about 2500 supporting pages (i.e. pages outside the ‘posts’ directory), and probably 12,000 image assets.
When I do a full site build using Middleman 3.4.1, it takes about 4 minutes on my machine to generate the full site.
If I do the same build using Middleman 4.1.0.rc.2, it takes around 15 minutes.
The major slowdown appears to occur as it reads the config file. Here are the lines from the verbose output:
== Change (#<Set: {:source}>): robots.txt
== Change (#<Set: {:source}>): sitemap/index.html.markdown
== Reading: Local config: config.rb
== Activating: blog
== Requesting resource list rebuilding: first_run_change_page
== Requesting resource list rebuilding: first_run_change_page
== Requesting resource list rebuilding: first_run_change_page
== Requesting resource list rebuilding: first_run_change_page
== Requesting resource list rebuilding: first_run_change_page
After displaying the line:
== Change (#<Set: {:source}>): sitemap/index.html.markdown
Middleman 4 seems to hang for a long time.
Is there anything that I can do to speed up Middleman 4? Would it help to ‘ignore’ the directories containing the image assets? I don’t know if these are being pulled into the sitemap (in the Middleman sense) and slowing the process somehow.
Thanks in advance for any suggestions.