At the Mouth of Monkeypatching Hell
For a while now, I’ve been trying to figure out a way to decrease the amount of time it takes [Jekyll][1] to render my blog. It now takes up to 6-8 minutes, which seems rather excessive.
So I tried pre-rendering a ton of pages instead of using Liquid to iterate through all date-based and tag-based archives, not to mention the custom taxonomies I implemented. But the place where Jekyll really gets stuck are the date-based and tag-based archives. I only recently found out that jekyll-archive
actually disables incremental regeneration, which means I have to re-render the whole damn thing no matter what.
So jekyll-archive
needed to go. And I started writing some code. And I think I might be on the verge of writing my own code engine, if I can figure out how to implement Liquid templates.
While on this long journey trying to rewrite the bulk of Jekyll functionality, being as how I’m just an amateur coder, I contemplated some crazy techniques. The Internet did successfully convince me that trying to subclass Array
or Hash
would be a horrific idea.
The Internet has not yet successfully convinced me of the madness of monkeypatching Time
.
It feels wrong, but I’m not sure writing my own Time
-like class is the right thing to do either.
Time will tell, I suppose.