DEV Community

Goon Nguyen
Goon Nguyen

Posted on

Speed test building Next.js T3 App with Github Actions, Circle CI, Vercel & Diginext

Since when I started building my own open-source cloud resouce platform - Diginext, although I had never done a benchmark, I kept thinking that I had built it for personal purposes only, to serve my teams and enhance their daily workflow. However, I must admit that I was not confident until today, the tests were supprising myself.

whatever it takes

() If you wanna check if I made incorrect configurations, here is the source code: https://github.com/digitopvn/t3-app-starter*

Now, let’s get the party started!

First time, with no cache:

1. Docker Engine on my Macbook M1 Pro

Took 4 mins and 33 secs (~273 seconds)

docker build speed

(with docker system prune and docker volume prune excecuted before running docker buildx)

2. Github Actions

Finished in 3m 56s

Github Actions docker build

3. Circle CI

They said they are nearly 2x faster than Github Actions, let’s see…

Huh?… 5m 48s

CircleCI Docker Build Speed

…not like the advertisement.

  • This is the .circleci/config.yml

    version: 2.1
    
    jobs:
      build-and-push:
        docker:
          - image: cimg/base:stable
        steps:
          - setup_remote_docker:
              version: 20.10.11
              docker_layer_caching: true
          - checkout
          - run: docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
          - run: docker buildx build --push -t digitop/t3-app-starter:circleci-v1 .
    
    workflows:
      version: 2
      docker-build-push:
        jobs:
          - build-and-push
    

4. Diginext

Not so bad… 3m 11s! (even faster than my macbook)

Diginext app build speed

Triggered by dx build command.

5. Vercel

Is the winner with… 1m 3s (incredible!)

Vercel app build speed

I guess because Vercel platform doesn’t have to spin up a Docker container, they just built the Next.js app natively, that’s why it didn’t take a lot of time for Docker cold start.

Alright, let’s do another round!

Second build, cached!

Notes that I changed nothing, just built them again.

1. My macbook M1 Pro

Great! when the cache hit, it only took 39 seconds

Docker build speed with cache

2. Github Actions

Wait… 4m 10s ?

(WTF? it’s even slower than the first run?)

Github Actions Docker build speed with cache

I followed this guide: https://docs.docker.com/build/ci/github-actions/cache/

I tried again a few time but sometime it was fast (~1min), sometime it was not (>3mins). It seems like the cache didn’t work or the workflows are just not stable. Not sure why.

Github Actions Docker build speed with cache multiple tries

3. Circle CI

Well, about 2x faster than the first run, completed in 2m 40s

Circle CI Docker build speed with cache

5. Vercel

Again, very impressive: 38 seconds (~40% faster than the first run)

Vercel app build speed with cache

4. Diginext

Woohoo… 21 seconds! When the cache hit, Diginext is the winner with ~90% faster than the first run.

Diginext app build with cache

This is so surprising… even with me, its creator.

Summary

GitHub Actions and Circle CI were originally designed for purposes other than building apps. Considering their primary functions, it's understandable that the current build speed is deemed acceptable.

On the other hand, the immensely popular Vercel is gaining significant traction. As a frontend cloud platform, it supports a wide range of the most popular frontend frameworks, and there's a good chance they will expand their support to include backend frameworks in the future.

In contrast, Diginext is an open-source cloud platform that caters to any types of applications. Its philosophy is encapsulated in the motto, “if it can run on your computer, it can run on Diginext”, and the platform's mission revolves around “making coding great again” by simplifying app deployment and cloud resource management.

I appreciate the boost in my confidence as these tests have helped me reconsider the value of Diginext. While it may be deemed unacceptable to compare it directly with renowned platforms like Vercel, it's encouraging to think that if it proves beneficial for my teams, it could potentially benefit the wider developer community as well.

Update: As I pen this article, I observe that Render and Railway are currently making strides towards the same objectives as Diginext. Witnessing their well-established services and robust financial backing does dampen my spirits slightly. However, I refuse to give up. I firmly believe that with the advantages of an open-source platform, Diginext can deliver value to the developer community, particularly to those of us who are financially challenged— much like myself, haha.

I will keep fighting

Top comments (0)