Skip to content
This repository has been archived by the owner on Dec 24, 2021. It is now read-only.

server task takes 2-7min to complete #42

Closed
ecerecerez opened this issue Aug 30, 2017 · 5 comments
Closed

server task takes 2-7min to complete #42

ecerecerez opened this issue Aug 30, 2017 · 5 comments

Comments

@ecerecerez
Copy link

ecerecerez commented Aug 30, 2017

Is it normal to have the server task take 2 to 7 minutes to complete (depends on the machine I use)?

Consider that running hugo server directly from the site dir takes less than a second.

[15:39:29] Finished 'hugo' after 4.65 s
[15:39:29] Starting 'server'...
[15:41:40] Finished 'server' after 2.17 min
[Browsersync] Access URLs:
 -------------------------------------
       Local: http://localhost:3000
    External: http://10.10.40.129:3000
 -------------------------------------
          UI: http://localhost:3001
 UI External: http://10.10.40.129:3001
 -------------------------------------
[Browsersync] Serving files from: ./dist

[Edit]
tested by commenting out the 'watch' subtasks, it looks like the bottleneck is the gulp watch hugo task.

@ghost
Copy link

ghost commented Aug 31, 2017

Hugo bin on its own can tear through 1,000 pps like butter when run on HDD. My take is the JS is the bottleneck as the code isn't compiled – it's interpreted.

@erquhart
Copy link
Contributor

I've seen very large sites run locally and never anything like this. Can you provide more details so we can reproduce? Is your repo public?

@ecerecerez
Copy link
Author

ecerecerez commented Feb 2, 2018

Sorry @erquhart it isn't public. We use Hugo's partials functionality no templates, and we copy js files instead of using webpack.

Here's the latest:

Built site for language en:
0 draft content
0 future content
0 expired content
1180 regular pages created
142 other pages created
5548 non-page files copied
0 paginator pages created
0 tags created
0 categories created
total in 3864 ms
 [08:57:52] Finished 'hugo' after 6.98 s
[08:57:52] Starting 'server'...
[09:00:18] Finished 'server' after 2.42 min
[BS] Access URLs:
 ----------------------------------------
       Local: http://localhost:3000
    External: http://192.168.103.241:3000
 ----------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.103.241:3001
 ----------------------------------------
[BS] Serving files from: ./dist

Would sharing the config file help?

@erquhart
Copy link
Contributor

erquhart commented Feb 2, 2018

Considering the number of files you're watching, this might be par for the course. The hugo task I'm using isn't stock, so that takes longer, but the rest is pretty much the same - here's what I'm seeing with a large site, but with considerably less files than yours:

Built site for language en:
0 draft content
47 of 47 futures rendered
0 expired content
566 regular pages created
522 other pages created
0 non-page files copied
198 paginator pages created
69 speaker created
0 tags created
115 categories created
0 collections created
56 author created
total in 14600 ms
[15:51:14] Finished 'hugo' after 34 s
[15:51:14] Starting 'server'...
[15:51:40] Finished 'server' after 26 s
[Browsersync] Access URLs:
 ------------------------------------
       Local: http://localhost:3000
    External: http://192.168.0.9:3000
 ------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.0.9:3001
 ------------------------------------
[Browsersync] Serving files from: ./dist

Perhaps there are ways to optimize the pipeline, or just get rid of gulp and use webpack (not certain it would be faster, but maybe so).

@erquhart
Copy link
Contributor

Closing this due to age, comment if you want to revive.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants