New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jekyll server slowing down with every regenerate #4103

Closed
mafeka opened this Issue Nov 3, 2015 · 17 comments

Comments

Projects
None yet
10 participants
@mafeka
Copy link

mafeka commented Nov 3, 2015

Hi Guys,
I've noticed and issue where jekyll serve is getting continually slower with every save.

One example:

      Regenerating: 1 file(s) changed at 2015-11-03 16:21:31 ...done in 6.850102 seconds.
      Regenerating: 1 file(s) changed at 2015-11-03 16:21:40 ...done in 7.496968 seconds.
      Regenerating: 1 file(s) changed at 2015-11-03 16:21:48 ...done in 8.425564 seconds.
      Regenerating: 1 file(s) changed at 2015-11-03 16:21:58 ...done in 9.104572 seconds.
      Regenerating: 1 file(s) changed at 2015-11-03 16:22:08 ...done in 9.668644 seconds.
      Regenerating: 1 file(s) changed at 2015-11-03 16:22:18 ...done in 11.160874 seconds.

This is me saving the same file a couple of times without actually changing anything. This basically happens with any type of change I do (JS, includes, layouts or posts/pages).

I'm running jekyll 2.5.3 with bundler on os-x. Any more information you need feel I'll gladly provide.

@envygeeks

This comment has been minimized.

Copy link
Contributor

envygeeks commented Nov 3, 2015

Latest stable is 3.0 please try with stable and confirm if this is still the case.

@bernardosulzbach

This comment has been minimized.

Copy link

bernardosulzbach commented Nov 4, 2015

Not trying to throw the blame at others, but you are sure that nothing else was devouring some hard drive operations or CPU cycles in those 47 seconds? Can top confirm that?

@perlun

This comment has been minimized.

Copy link

perlun commented Nov 14, 2015

It also looks rather slow with the average regenerate time being between 5 and 10 seconds. This is what I currently get, with 3.0:

      Regenerating: 1 file(s) changed at 2015-11-14 16:51:23 ...done in 0.524168 seconds.
      Regenerating: 1 file(s) changed at 2015-11-14 16:51:24 ...done in 0.516215 seconds.
      Regenerating: 1 file(s) changed at 2015-11-14 16:51:48 ...done in 0.596394 seconds.
      Regenerating: 1 file(s) changed at 2015-11-14 16:51:49 ...done in 0.394591 seconds.

I.e. no apparent slowdown, and times in the <1s range. Also on Mac OS X, with a recent MacBook Pro, but shouldn't really be that much slower even on somewhat older hardware I'd hope...

@bernardosulzbach

This comment has been minimized.

Copy link

bernardosulzbach commented Nov 14, 2015

@perlun I don't have recorded tests to show you, but IIRC this really depends on what you change. Usually between .4 and 1.1 seconds to me (for normal markdown edits using a common Jekyll 2.4 setup). So your point is valid, it could really be something else.

@ochrons

This comment has been minimized.

Copy link

ochrons commented Nov 15, 2015

I get the same slowing down with 3.0 on Windows 10.

Regenerating: 1 file(s) changed at 2015-11-16 00:08:37 ...done in 5.721015 seconds.
      Regenerating: 1 file(s) changed at 2015-11-16 00:08:46 ...done in 5.4779 seconds.
      Regenerating: 1 file(s) changed at 2015-11-16 00:08:51 ...done in 5.826536 seconds.
      Regenerating: 2 file(s) changed at 2015-11-16 00:09:50 ...done in 4.867958 seconds.
      Regenerating: 1 file(s) changed at 2015-11-16 00:09:55 ...done in 5.909498 seconds.
      Regenerating: 1 file(s) changed at 2015-11-16 00:10:20 ...done in 5.44346 seconds.
      Regenerating: 1 file(s) changed at 2015-11-16 00:10:25 ...done in 5.481539 seconds.
      Regenerating: 1 file(s) changed at 2015-11-16 00:10:32 ...done in 5.942914 seconds.
      Regenerating: 1 file(s) changed at 2015-11-16 00:10:38 ...done in 8.027528 seconds.
      Regenerating: 2 file(s) changed at 2015-11-16 00:10:46 ...done in 6.671621 seconds.
      Regenerating: 1 file(s) changed at 2015-11-16 00:10:55 ...done in 7.738002 seconds.
      Regenerating: 1 file(s) changed at 2015-11-16 00:11:03 ...done in 7.0728 seconds.
      Regenerating: 1 file(s) changed at 2015-11-16 00:11:42 ...done in 7.402999 seconds.
      Regenerating: 1 file(s) changed at 2015-11-16 00:11:50 ...done in 7.43286 seconds.
      Regenerating: 1 file(s) changed at 2015-11-16 00:12:04 ...done in 8.533149 seconds.
      Regenerating: 1 file(s) changed at 2015-11-16 00:12:12 ...done in 8.97571 seconds.
      Regenerating: 1 file(s) changed at 2015-11-16 00:13:33 ...done in 10.909197 seconds.
      Regenerating: 2 file(s) changed at 2015-11-16 00:13:44 ...done in 11.573234 seconds.
      Regenerating: 1 file(s) changed at 2015-11-16 00:14:39 ...done in 10.456342 seconds.

Note, --incremental is not being used.

Didn't have this issue with the previous version.

@envygeeks

This comment has been minimized.

Copy link
Contributor

envygeeks commented Nov 15, 2015

Provide more information and enable debug logging.

@ochrons

This comment has been minimized.

Copy link

ochrons commented Nov 17, 2015

Looking at the Windows task manager I see that the Jekyll (ruby) process is taking 100% of a single core while it's just serving the pages and waiting for changes. The CPU load seems to be distributed over several threads.

The -V debug output shows nothing suspicious, just normal rendering logs.

@mafeka

This comment has been minimized.

Copy link
Author

mafeka commented Nov 18, 2015

Hey,
I've now upgraded to Jekyll 3 and don't see the continous increase in build times. However regenerating seems slow still.

Is there any way for me to find out what's taking so long?

@bernardosulzbach

This comment has been minimized.

Copy link

bernardosulzbach commented Nov 18, 2015

Maybe it is just Jekyll speed. It may also be due to a slow processor, slow HDD, not enough contiguous free RAM, etc.

@parkr

This comment has been minimized.

Copy link
Member

parkr commented Nov 18, 2015

You can use --profile to learn more.

@ochrons

This comment has been minimized.

Copy link

ochrons commented Nov 27, 2015

For me the solution was to gem install wdm (on Windows 10) so the issue seems to be related to change polling.

@parkr parkr closed this Dec 16, 2015

@ozzyogkush

This comment has been minimized.

Copy link

ozzyogkush commented Dec 1, 2016

I am noticing this as well, on a MBP (2015) with 2 cores and 16GB of RAM, running OSX 10.11.6.

Initial serve will build at about 80 seconds, but changing a file will cause the next regeneration to take anywhere from 100 - 300 seconds. When I remove sections that are significant causes of slowdown, the pattern remains. Compounding slowdown hinders rapid development and my team's ability to focus on solving problems.

Ruby 2.1.6
Bundler 1.10.6
Jekyll 3.2.1

@buschnyj

This comment has been minimized.

Copy link

buschnyj commented Jan 27, 2017

Hey all,

I'm having the same problem on MBP Quad core.

The initial build takes about 100 seconds, while updates take 30-40 seconds give or take. Ruby is hogging about 99% easier. It's agonizingly slowing my workflow.

Ruby 2.1.6
Bundler 1.13.7
Jekyll 3.3.1

edit: updated additional info

@mariacheline

This comment has been minimized.

Copy link

mariacheline commented Feb 20, 2017

I'm having the same problem. It takes 10-30 seconds for jekyll to regenerate. And yes, it annoyingly slow down my workflow. This happens on every project I do, even when the file is almost empty.

Ruby 2.3.3
Jekyll 3.3.1
Bundler 1.13.7

regenerate jekyll

@parkr

This comment has been minimized.

Copy link
Member

parkr commented Feb 20, 2017

@mariacheline: Do you have any other folders in your jekyll site source? We have found that some, like node_modules, can slow down the generation of your site considerably.

@PrasadHonrao

This comment has been minimized.

Copy link

PrasadHonrao commented Aug 18, 2017

Same problem. I dont have any node_modules folder as well. Please help

Ruby - 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32]
Jekyll - 3.3.1
OS - Windows 10 64 bit.

image

@mariacheline

This comment has been minimized.

Copy link

mariacheline commented Aug 18, 2017

I left this behind since it ridiculously went up to more than 200 seconds. I started using browsersync with gulp, instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment