Do not use WordPress gist embeds

I was quite excited when I discovered that it is possible to embed gist links into WordPress blog posts, and they will render as syntax highlighted code:

Gist embedded in Lambda Go Starter Project

Since I write most of my posts in Markdown I would previously provide the code with Markdown code blocks, but these did not provide syntax highlighting:

Original way of embedding code with Markdown in Next.js with Bootstrap Getting Started

Unfortunately using Gists in WordPress posts makes these painfully slow to load. Here the loading times for one of the posts that includes Gists:

Timing for loading embedded in Lambda Go Starter Project with Gists

What makes matters worst is that this also affects loading the home page of the blog, even if posts are only included as excerpts. Here loading https://maxrohde.com which comes in at a whopping 13 s:

Loading blog homepage is slowed down by posts containing gists

Being in Australia, I do not expect for many pages to be loading lightning fast – but 13 s is just too much. I contacted WordPress support but they were of little help, suggesting I transition to a plan that includes a CDN (which made me pause thinking why they don’t use a CDN by default 🤷‍♂️) and that this wasn’t any issue related to the platform but only to my blog in particular; although the Gists support is documented as one of the features: Gist Support WordPress.

This along with the problems with the new block editor, which is literally unusable since it somehow always runs into problems saving the latest edits (happened already 5x when trying to write this post 😂).

Good luck seeing this error when editing a long post – it is only visible when scrolling to the top

When I started this blog, many, many years ago, I said to myself that I will not do what my developer self wants me to do, and spend a very long time setting up a super neat automated solution that will host the blog using the newest and shiniest technology. Instead, I thought I’ll just use a very simple solution even if it is not perfect. WordPress is definitely testing my tolerance for not perfect and may supply me with the excuse to try and engineer something better.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s