DougBeney / jekyll-pug

Jekyll Plugin That Allows You To Use Pug
MIT License
37 stars 2 forks source link

Extremely long build times #7

Closed taxilly closed 6 years ago

taxilly commented 6 years ago

Since switching over to this plugin my build times have gone from 20-ish seconds to over 220 seconds, most of the time taken up by pug compiling, is there any way to speed up this process?

DougBeney commented 6 years ago

While it is true that this plugin increases the build time of a project, I have never experienced that long of build times. For the Jekyll-Pug Website it takes 4.049 seconds for a complete build. Can you please let me know how big your project is in comparison to the Jekyll-Pug website?

I've just started working on a new version of Jekyll-Pug to add new features and hopefully increase performance.

Thanks for using the plugin!

EDIT: Fixed link

taxilly commented 6 years ago

https://github.com/twentytwoo/mainstrea.ml

I haven't fully ported the site, but just changing the default layout to pug causes the build time to spike :/

DougBeney commented 6 years ago

Interesting. I'll try to get out a version this week to hopefully fix the performance issues.

I'm assuming that this long build time is only when you initially run the site. Once it's running and you modify a file, it shouldn't take the same amount of time to build again, right?

taxilly commented 6 years ago

Long build times don't occur when editing the SCSS, editing the pug/HTML however does.

DougBeney commented 6 years ago

And just for my information, what version of Node are you running? You can type node -v to figure that out.

taxilly commented 6 years ago
home> node -v
v6.11.3
DougBeney commented 6 years ago

Just released Jekyll-Pug version 1.0.1 today.

Many great improvements you can read about in the changelog, such as native Pug includes becoming fully functional.

Speed should also be greatly improved, so I hope it helps you out.

If you're using a Gemfile, you could simply type bundle update to get the new version.

taxilly commented 6 years ago

220 second+ build time still present, I've narrowed it down to the 100+ posts on my blog that's causing the issue, removing all the posts sends to build time to less than a second.

taxilly commented 6 years ago

Just started afresh and got the build time down to 30-ish seconds with all posts, good job on the plugin 👍

DougBeney commented 6 years ago

Just want to report that there is a new update that I have a feeling will take your 30 second build time to 6 seconds or less.

taxilly commented 6 years ago

Before:

      Generating... 
pug version: 2.0.0-rc.4
                    done in 145.844 seconds.

After:

      Generating... 
pug version: 2.0.0-rc.4
                    done in 5.966 seconds.

I damn near spat out my tea, great job! What did you do?

DougBeney commented 6 years ago

Epic! Power of caching, right?

DougBeney commented 6 years ago

Hi, @twentytwoo!

Good news! I've been working on a project to bring down Jekyll build times even more if you are still interested.

It is called Jekyll-Bliss.

It has already reduced my build time by 63%!