Remix.run Logo
doomspork 2 days ago

We migrated https://ElixirSchool.com off of Jekyll to Phoenix and NimblePublisher back in 2021 (we covered it here: https://elixirschool.com/blog/now-with-more-elixir as well as a lesson on NimblePublisher and Phoenix here: https://elixirschool.com/en/lessons/misc/nimble_publisher). Since then it's worked well for the most part (more on that below) but as we've grown it's become apparent this solution doesn't scale well so now we're exploring options like sqlite.

If you consider how this all works the issue becomes rather obvious: Your content is compiled into Elixir module attributes as strings at build time. The more content you have, the larger these modules become and the more data gets compiled into your application. For a small blog with a small number of posts this would work fine. In our case the ever growing list of lessons, posts, and translations results in a lot of content.

This creates two main pain points: First, compilation times have become painfully slow as the compiler has to process all that content into module attributes on every build. Second, on more than one occasion our Fly.io release has failed due to size and memory usage during deployment, thankfully retries have worked and gotten us on our way.

The trade-off here is that NimblePublisher's strength, everything pre-compiled for fast serving, becomes its weakness when you're dealing with substantial content volumes.

When we pull the trigger on a migration away from NimblePublisher we'll be sure to publish an updated blog post.

joelcares 2 days ago | parent [-]

With incremental builds 11ty compilation is very fast.