Single character commit

A «single character commit» is a really simple commit (only one character as you can understand) that can have a real impact on a codebase. Today I commited a single character fix that was totally worth it, it reduces the time of build of this website by almost 50%…

First some context, this site is statically generated by Jekyll on Gitea CI server, the CI workflow simply builds a docker image with the content of Jekyll’s build. Since I’ve setup this build workflow, it takes quite some time to deliver but I’ve never taken the time to search the reason until today.

Gitea capture of the time necessary for a build

My site is generated in more than 4 minutes, there might be something weird in the build process, no kidding…

While scrolling in the CI details, I noticed 2 things :

Gitea capture of build details

OK, let’s update the Gemfile by using an https link for getting ruby gems. Here is the diff of my «single character commit» :)

diff --git a/Gemfile b/Gemfile
index f5a147d..3a69881 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,4 +1,4 @@
-source ""
+source ""

Encoding.default_external = Encoding::UTF_8

One commit, one push and a bit more than 2 minutes later, I get a new build…

Gitea capture of the build process after commit

With nothing more than a character I reduced almost by half the time of build.

For the story, I didn’t change this line since 2012 when I’ve setup this blog with Jekyll, at the time SSL certificate were expensive and Let’s Encrypt was not even created. Never thought about doing this kind of updates.

I just love those little things, that brings joy into my developer’s life.