Build Time Minimalization: the not-so-invisible secrets of great coding
Coding is a complex craft, and many of the most profound updates are invisible to the end user, but crucial to the developers. A better experience for the developers leads to a better codebase in general. For that reason, in every project we develop, we keep an eye on the build time.
Build time is the amount of time it takes for the code to compile. Why does that matter?
If build time is quick, it means that a coder can (and will) test their code at shorter intervals, tweaking the code and making each feature more perfectly crafted.
Paying attention to build time pre-empts future problems. For example, in one of our long-term projects, we made the move to React for the front end, but left some of the code in Jade. The Jade code was working well, but it was slowing down the build time by as much as five minutes because of the server-side calls in the code. By refactoring, we didn’t just improve the build time. We also are future-proofing the code base from dependencies in other areas. Refactoring also reduces code debt and makes it easier to add future features. As with anything else, having the right tools for the job means that we can pinpoint the areas for upgrading.
The diagram below shows our project dashboard for the build time of an application. The blue shading shows which area of the code is taking the most time to compile during the build. At Clevertech, we pay attention to the build time of all of our projects and we have the tools that allow us to peer into each step of the process so we can ensure cutting edge standards. This chart is pulled out of a recent review, with all the project names changed for sharing on this blog.
At Clevertech, we pay attention to the build time of all of our projects and we have the tools that allow us to peer into each step of the process so we can ensure cutting edge standards. This chart is pulled out of a recent review, with all the project names changed for sharing on this blog.
You can see that not only do we break down the average build time for each project, we also use a Kibana chart that breaks down the average by github branch. We can see how fast the master branch vs the development branch. For example, Project 3 have a big difference between dev and prod. But in this case, it looks like the dark coded project 1 is the slowest, so lets take a look at that in more depth.
Digging in more deeply, here is the view using BlueOcean plugin, so we can see each step in the build. We can see the breakdown of the steps where one step was taking 7 minutes - more than double the time of any other part of that build cycle.
If we could focus just on that one process, we could halve the build time in this section.
As shown below, we brought the process time down from 7 minutes to less than 1 minute by using a cache for this step and cleaning up just two of the processes during the Build and Push Images process.
Making these kinds of improvements is a matter of pride and craftsmanship for us at Clevertech.
It’s not just about providing the highest quality software development; it’s also about enjoying our work. Developers are happy when they don’t waste time waiting for code to compile. We can all focus on performing our best when the environment is conducive to efficient work.
Reach out to find out more about why the top global corporations prefer Clevertech as their outsourced development team.
If you’d like to find out more about our culture at Clevertech and current job openings, check out our YouTube channel and visit clevertech.careers.
Want to peak into our daily work? Our coaches recount real world situations shared as learning opportunities to build soft skills. We share frameworks, podcasts and thinking tools for sr software developers.
Keep on readingGo to Blog home
The (remote) opportunities
We expect professionalism and client service, so we can offer a deeply caring experience for our clients. In return, you get freedom to work wherever you want. No timesheets, no big brother watching every move. We trust you to know what’s best to find the right solution.