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
Large Refactor: Server-side pagination and optimization #118
Conversation
This commit does several things: - Moves pagination server-side and eliminates the client JSON load delay (also fixing Google indexing) - Makes paging controllable via the config again - Normalizes config differences - Sets top navigation classes (and styling) on generation (eliminating flicker on load) - Eliminates the need to generate a corresponding _tag/<name>.md entry for every new tag - pages are generated directly off the posts themselves - Eliminates two JavaScript file loads: hashchange and browser - Removes the engineering and company folders with lots of duplicate code (now defined in the generator and DRY coded) - Eliminates all global JavaScript variables (by removing most of the JavaScript) - Removes many hidden-on-load stylings since the content is immediately there now - Resolves the reverse-chronological archived comment ordering (due to .prepend()) - Speeds up full rebuilds 15-25x - **Removes** paging on the author page (this is intended to be added back - stop-gap commit here) - **Removes** compression and the compression layout - this had very, very little benefit at a high cost and much more difficult dev debugging While Jekyll is doing far more work here - it’s also doing so much faster due to optimizing how liquid is used. With a combination of removing inefficient liquid loops (especially the tag counts) and moving one-time shared generation to Ruby on the posts, builds went from 300-350 seconds on this 2013 MacBook down to 15-25 seconds. Next steps: re-paginate authors and move archive comments to server-side generation.
Side note here: I don't Ruby. If someone wants to tell me everything wrong with that plugin please do. I'd actually love corrections conveyed however you like: via PR (code fixes are as good as comments to me), or here, or...whatever. I'm sure there are missteps in there (I don't even have an IDE for Ruby installed), and I'd honestly appreciate being told what's wrong & can be better. |
This also normalizes a duplicate “announcements” tag on a single post - the rest were “announcement”
This commit does several things: - Moves pagination server-side and eliminates the client JSON load delay (also fixing Google indexing) - Makes paging controllable via the config again - Normalizes config differences - Sets top navigation classes (and styling) on generation (eliminating flicker on load) - Eliminates the need to generate a corresponding _tag/<name>.md entry for every new tag - pages are generated directly off the posts themselves - Eliminates two JavaScript file loads: hashchange and browser - Removes the engineering and company folders with lots of duplicate code (now defined in the generator and DRY coded) - Eliminates all global JavaScript variables (by removing most of the JavaScript) - Removes many hidden-on-load stylings since the content is immediately there now - Resolves the reverse-chronological archived comment ordering (due to .prepend()) - Speeds up full rebuilds 15-25x - **Removes** paging on the author page (this is intended to be added back - stop-gap commit here) - **Removes** compression and the compression layout - this had very, very little benefit at a high cost and much more difficult dev debugging While Jekyll is doing far more work here - it’s also doing so much faster due to optimizing how liquid is used. With a combination of removing inefficient liquid loops (especially the tag counts) and moving one-time shared generation to Ruby on the posts, builds went from 300-350 seconds on this 2013 MacBook down to 15-25 seconds. Next steps: re-paginate authors and move archive comments to server-side generation.
This also normalizes a duplicate “announcements” tag on a single post - the rest were “announcement”
Awesome work. Blazingly fast now. |
Large Refactor: Server-side pagination and optimization
Large Refactor: Server-side pagination and optimization
Many changes here that had to be wrapped together, so I'll enumerate:
delay (also fixing Google indexing)
flicker on load)
for every new tag - pages are generated directly off the posts
themselves
code (now defined in the generator and DRY coded)
JavaScript)
immediately there now
.prepend()
)back - stop-gap commit here)
very little benefit at a high cost and much more difficult dev debugging
While Jekyll is doing far more work here - it’s also doing so much faster due to optimizing how liquid is used. With a combination of removing inefficient liquid loops (especially the tag counts) and moving one-time shared generation to Ruby on the posts, builds went from 300-350 seconds on this 2013 MacBook down to 15-25 seconds.
Next steps: re-paginate authors (even the worst case, Jeff Atwood, performs fine as-is) and move archive comments to server-side generation (this needs a Python => YAML discussion Monday to be crazy efficient).