Skip to content
This repository has been archived by the owner on Mar 5, 2020. It is now read-only.

Generating static index.html files takes a long time #657

Closed
toolness opened this issue Apr 10, 2015 · 1 comment
Closed

Generating static index.html files takes a long time #657

toolness opened this issue Apr 10, 2015 · 1 comment

Comments

@toolness
Copy link
Contributor

I've noticed that generating the static index.html files takes a very long time: about 14 seconds on my fairly new-ish desktop, and upwards of 30 seconds on my 2010 Macbook Air. Removing the static file generation process entirely actually makes the rest of the build process very quick, so it's definitely not webpack or anything else that's slowing things down.

Aside from making things slow, this also has a negative impact on the webserver's auto-reload functionality: often when making a code change, webpack will reflect the change into the dist directory almost instantly, which results in a page refresh. At this point I'll start interacting with the page, only for it to reload yet again about 12 seconds later because the index files have finally regenerated, which triggers another reload.

Even though we'll likely be moving away from a static site in #585, this issue is still relevant since we don't want server-side rendered code to take eons to generate.

@toolness
Copy link
Contributor Author

It turned out the culprit was actually gulp-prettify, which was taking 12 of those 13 seconds! Switching to gulp-html-prettify sped things up immensely.

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

1 participant