Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.

Improve performance #84

Merged
merged 13 commits into from Jul 29, 2017
Merged

Improve performance #84

merged 13 commits into from Jul 29, 2017

Conversation

tfausak
Copy link
Contributor

@tfausak tfausak commented Jul 28, 2017

This will fix #81. It's still a work in progress.

  • This removes almost all dependencies. That means no more Hakyll on Pandoc.
  • I wasn't able to remove all non-boot dependencies. It would be possible to avoid cmark by writing the issues in HTML, but I don't think that's worth it. Both text and cmark build pretty quickly.
  • To avoid pulling in a YAML parser I switched from YAML front matter to an HTML comment. That's why all the content/issues/*.markdown files changed.
  • I rolled my own (probably terrible) template engine. It only supports simple substitutions delimited by dollar signs.
  • I haven't sanity checked the output for good Unicode support, smart quotes, and stuff like that.
  • The Atom and XML feeds don't exist yet.
  • The actual code is pretty gross. It's a first pass.

In spite of all that, it appears to work and builds super fast. We'll see what CI says.

@tfausak tfausak added the bug label Jul 28, 2017
@tfausak tfausak self-assigned this Jul 28, 2017
@tfausak
Copy link
Contributor Author

tfausak commented Jul 28, 2017

Less than 10 minutes from scratch isn't too bad. That includes installing GHC.

@tfausak
Copy link
Contributor Author

tfausak commented Jul 28, 2017

Hmm, 4 minutes with a warm cache isn't quite as good as I was expecting. None of the groups of lines in the build log have a time higher than 20 seconds, so it must be restoring the cache or something. I think that Travis has images for GHC 7.8; if I was able to use that I might get even better build times.

@tfausak
Copy link
Contributor Author

tfausak commented Jul 29, 2017

I think 2 minutes with a warm cache is about as good as it gets. That's how long a Jekyll build takes. Overall I think this is ready to go. It takes a cold cache build from more than 50 minutes to about 10 minutes; a warm cache from 8 minutes to 2.

I made a couple changes to the output, but by and large everything should be the same. Obviously my home grown static site generator doesn't have as many features as Hakyll, but it was surprisingly easy to put together. The flow for making new issues hasn't changed at all, so that's good.

@tfausak tfausak merged commit edac69f into hakyll Jul 29, 2017
@tfausak tfausak deleted the gh-81-improve-performance branch July 29, 2017 15:39
@jgm
Copy link

jgm commented Jul 31, 2017

I rolled my own (probably terrible) template engine. It only supports simple substitutions delimited by dollar signs.

Why not use doctemplates, pandoc's templating engine, which is available as a separate package?

@tfausak
Copy link
Contributor Author

tfausak commented Jul 31, 2017

I didn't know about doctemplates! It looks like the good version of what I ended up with. I'm sure building it is fast enough, but I ended up with only two dependencies (cmark and text). Depending on doctemplates would drag in at least 7 (non-builtin) dependencies.

I think if I was going to bring a templating package in, it would probably be template. But what I've got works pretty well for now.

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

Successfully merging this pull request may close these issues.

None yet

2 participants