4 ms·
That and faster builds overall, especially with large projects. For example, the documentation of my MadelineProto project would take more than an hour to compi
by danogentili 3y ago
That and faster builds overall, especially with large projects.
For example, the documentation of my MadelineProto project would take more than an hour to compile with Jekyll, compared to a few minutes with Gojekyll.
- arp242 3y agoAn hour seems way too long; but I can confirm it's very slow. However, almost all of that is in this loop to generate the navigation: https://github.com/danog/MadelineProtoDocs/blob/master/docs/_layouts/default.html#L54-L69 https://github.com/danog/MadelineProtoDocs/blob/master/docs/... If I disable that your project builds in 30 seconds (no cache!) on my pretty old and not very fast i5-8350U, which is roughly what I'd expect for a project of this site. It will be even faster with cache, obviously. I didn't look too closely, but I'm reasonably sure that can fixed so the total build time will be 30-40 seconds without to much effort; it looks like it's just generating the same HTML every time, so just caching it on the first generation seems like the obvious way. And sure, Gojekyll is loads faster and more forgiving of these kind of inefficiencies, but "a few minutes" still seems pretty slow, especially considering even plain Jekyll can do it significantly faster.
- danogentili 3y agoNeat, thanks for noticing, the theme is basically a slightly simplified version of https://github.com/just-the-docs/just-the-docs https://github.com/just-the-docs/just-the-docs, never suspected it was an issue with it, I'll take a look to see what can I fix!
- arp242 3y agoI think GitHub Pages only supports a whitelist of plugins, so you might have some more difficulties solving it well without any plugins. I use Netlify for my site, which does support arbitrary plugins. One quick way to make it faster is to include that "_includes/nav.html" only in a nav.html, and then use an iframe to load that on every page, or something like that. Anyway, I'm not the first to notice this it seems, although even "twice as fast" would still be quite slow: https://github.com/just-the-docs/just-the-docs/issues/1323 https://github.com/just-the-docs/just-the-docs/issues/1323