{"id":262,"date":"2026-10-13T04:51:20","date_gmt":"2026-10-13T04:51:20","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2010\/06\/21\/how-we-reduced-build-time-from-8-hours-to-1-hour\/"},"modified":"2026-10-13T04:51:21","modified_gmt":"2026-10-13T04:51:21","slug":"how-we-reduced-build-time-from-8-hours-to-1-hour","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/how-we-reduced-build-time-from-8-hours-to-1-hour\/","title":{"rendered":"From 8-Hour Builds to 1-Hour Feedback: A Practical CI Optimization Pattern"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This case study shows how a team reduced build feedback time from <strong>8 hours to 1 hour<\/strong> by restructuring build and test execution. It is most useful for DevOps engineers and tech leads who need faster feedback, more stable integration cycles, and better use of existing build hardware.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Originally published on 2010-06-21; fully revised and updated.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Source article: <a href=\"https:\/\/www.devopsschool.com\/blog\/how-we-reduced-build-time-from-8-hours-to-1-hour\/\">How we reduced build time from 8 hours to 1 hour<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2010\/06\/hudson-master-slave-setup.png\" alt=\"hudson master slave setup\" width=\"600\" height=\"400\" \/><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The starting point: slow builds and low confidence<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The original situation described a common CI pain pattern: long-running nightly pipelines, frequent failures, and delayed feedback. That combination usually reduces developer trust in the build signal.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Build duration was around 8 hours, with frequent nightly failures.<\/li><li>Test execution consumed more time than compilation.<\/li><li>Developers had low confidence in nightly build outcomes during integration cycles.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Workflow that reduced feedback time<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The key shift was to separate <strong>fast per-commit validation<\/strong> from <strong>full daily validation<\/strong>. Fast tests ran on every commit, while the heavier test suite moved to a scheduled run on a remote agent.<\/p>\n\n\n\n<pre class=\"mermaid\">\nflowchart LR\n    A[Developer commit] --> B[CI build trigger]\n    B --> C[Parallel module compile]\n    C --> D[Run fast tests]\n    D --> E{Build pass}\n    E -- no --> F[Fix and recommit]\n    E -- yes --> G[Fast feedback to team]\n    B --> H[Nightly job on remote agent]\n    H --> I[Run full regression suite]\n    I --> J[Integration and release confidence]\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Changes implemented and why they helped<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Implemented change<\/th><th>Problem addressed<\/th><th>Why it helped<\/th><\/tr><\/thead><tbody><tr><td>Refactored build scripts for parallel module compilation (where possible)<\/td><td>Compilation bottlenecks<\/td><td>Reduced total build wall-clock time by using available concurrency<\/td><\/tr><tr><td>Selected tests with no external-service dependency for build-stage execution<\/td><td>Slow, fragile test phase<\/td><td>Kept per-commit pipeline fast and deterministic<\/td><\/tr><tr><td>Established CI (originally using open-source CruiseControl) for per-commit builds<\/td><td>Late defect discovery<\/td><td>Provided earlier quality feedback after each change<\/td><\/tr><tr><td>Added a low-cost remote agent for the remaining test suite once per day<\/td><td>Resource contention in the main build path<\/td><td>Offloaded expensive tests without blocking developer feedback<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Commit-stage vs nightly-stage testing model<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Stage<\/th><th>Main goal<\/th><th>Typical test scope<\/th><th>Dependencies<\/th><th>Frequency<\/th><\/tr><\/thead><tbody><tr><td>Per-commit CI stage<\/td><td>Fast signal for developers<\/td><td>Compilation plus fast tests<\/td><td>Avoid external services when possible<\/td><td>Every commit<\/td><\/tr><tr><td>Nightly remote-agent stage<\/td><td>Broader validation and integration confidence<\/td><td>Remaining full suite<\/td><td>Can include external systems and heavier setup<\/td><td>Once per day<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Example implementation patterns (illustrative)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The original post does not publish exact scripts, so the snippets below are <strong>implementation patterns<\/strong> that mirror the approach: parallel build plus fast tests on commit, full suite on a scheduled remote agent.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Per-commit job commands<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript language-bash\"><span class=\"hljs-meta\">#!\/usr\/bin\/env bash<\/span>\n<span class=\"hljs-keyword\">set<\/span> -euo pipefail\n\n.\/build.sh --parallel\n.\/run-tests.sh --suite fast<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Nightly job on remote agent<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript language-bash\"><span class=\"hljs-meta\">#!\/usr\/bin\/env bash<\/span>\n<span class=\"hljs-keyword\">set<\/span> -euo pipefail\n\n.\/run-tests.sh --suite full --agent remote-1 --report-dir reports\/nightly<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Scheduled CI workflow example<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-yaml\">name: nightly-full-suite\non:\n  schedule:\n    - cron: <span class=\"hljs-string\">'0 2 * * *'<\/span>\njobs:\n  full-regression:\n    runs-on: &#91;<span class=\"hljs-keyword\">self<\/span>-hosted, remote-agent]\n    steps:\n      - run: .\/run-tests.sh --suite full<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Reported outcomes from the original case<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Build duration was reduced from 8 hours to about 1 hour.<\/li><li>Faster feedback improved developer confidence in CI results.<\/li><li>The team was able to adopt additional engineering best practices.<\/li><li>Existing hardware was used more effectively, avoiding additional infrastructure cost.<\/li><li>Release management became smoother.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Best practices and common pitfalls<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Tier tests intentionally:<\/strong> keep per-commit checks fast; run heavier suites on schedule or on-demand.<\/li><li><strong>Parallelize safely:<\/strong> only parallelize modules with clean dependency boundaries.<\/li><li><strong>Protect fast feedback:<\/strong> avoid adding flaky external-service tests to the commit path.<\/li><li><strong>Use remote agents for expensive jobs:<\/strong> isolate heavy workloads from developer-facing CI.<\/li><li><strong>Track the right metrics:<\/strong> build duration, queue time, test flakiness, failure cause, and feedback latency.<\/li><li><strong>Avoid over-optimization:<\/strong> speed improvements should not hide critical regressions; keep full-suite coverage in place.<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This case-study rewrite breaks down how build feedback was reduced from 8 hours to 1 hour by combining parallel compilation, test-suite tiering, and a remote nightly agent. It also shows how to apply the same pattern in modern CI pipelines.<\/p>\n","protected":false},"author":1,"featured_media":4425,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[4255,4252,4254,4257,1122,3113,4253,1806,4256,4240,593,4251,4258,104,1452],"class_list":["post-262","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorised","tag-build-process-time","tag-build-time","tag-build-time-optimization","tag-decrease-build-time","tag-guide","tag-how-to","tag-how-to-reduced-build-time","tag-instruction","tag-lessen-build-time","tag-method","tag-process","tag-reduce","tag-save-build-time","tag-tutorials","tag-ways"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=262"}],"version-history":[{"count":4,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/262\/revisions"}],"predecessor-version":[{"id":79090,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/262\/revisions\/79090"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/4425"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}