BlogsVercelTurborepo Performance Optimizations

Turborepo Performance Optimizations

Turborepo Performance Optimizations

40
posts
2021–2026

Turborepo is a high-performance build system for JavaScript and TypeScript monorepos. It optimizes builds through intelligent caching, parallel execution, and remote caching capabilities. Vercel acquired Turborepo to accelerate build speed and improve developer experience, making the CLI open source and integrating it with Vercel's infrastructure for task sharing. The acquisition aims to unlock the power of monorepos by abstracting complex configuration into a cohesive build system. This post details the strategy and technical challenges of porting Turborepo from Go to Rust, focusing on an incremental porting approach using CGO for inter-language communication and JSON serialization for argument passing. It highlights the implementation of global `turbo` and CLI argument parsing in Rust, and the resolution of platform-specific issues like Windows toolchain compatibility and path handling.

2026

Making Turborepo 96% faster with agents, sandboxes, and humans

3/30/2026

Introduced significant performance improvements to Turborepo, resulting in up to 96% faster task graph computation. This was achieved through: 1. AI agent-assisted code analysis leading to optimizations like hashing by reference and switching to `xxhash-rust`. 2. Replacing an inefficient Floyd-Warshall algorithm with a multi-source DFS. 3. Developing a new `turborepo-profile-md` crate to generate LLM-friendly CPU profiles in Markdown format, improving the analysis of performance bottlenecks for both humans and agents. This new format includes sorted hot functions and call trees, making profiling data more accessible and actionable.

2025

Tray.ai cut build times from a day to minutes with Vercel | Customers | Vercel

6/16/2025

Tray.ai migrated their marketing site to Vercel and Next.js, consolidating their architecture into a single Turborepo monorepo. This migration resulted in a significant reduction in build times, from a full day to just two minutes, by leveraging Vercel's platform and Next.js. The new architecture uses a hybrid approach of SSG, SSR, and CSR, with Vercel Functions for their forms engine. They also utilize Vercel Analytics and Speed Insights for performance monitoring and have leveraged Vercel's Edge Network for resilience against DDoS attacks.

2024

Extra Space Storage's build times became 17x faster with Vercel | Customers | Vercel

12/11/2024

This post details how Extra Space Storage achieved 17x faster build times by migrating their flagship site to Vercel and leveraging Next.js. The migration streamlined their frontend architecture, utilizing Vercel's global Edge Network, Incremental Static Regeneration (ISR) for primary sales flow pages, and Edge Middleware for routing and personalization. The use of per-branch environments significantly improved testing and reduced build times by 95%. The platform's ability to handle caching and serverless functions reduced infrastructure management overhead, improving site reliability and stability.

From minutes to seconds: How Meter accelerates delivery with Vercel and Next.js | Customers | Vercel

11/26/2024

Meter migrated their Dashboard product to Vercel and Next.js, consolidating their architecture into a unified repository. This resulted in a significant reduction in build times, from over 10 minutes to less than a minute, and improved CI/CD iteration speed. They leveraged Vercel's support for React, Vite builds, and preview deployments for every feature branch. The integration with Next.js API Routes facilitated seamless syncing between frontend and backend data processing.

MotorTrend: Shifting into overdrive with Vercel | Customers | Vercel

11/7/2024

This post details how MotorTrend migrated their digital experience to Vercel and Next.js, resulting in a 7x reduction in build times (from 42 minutes to 6 minutes) and accelerating feature release timelines from 18.9 days to 10 minutes. It highlights the benefits of Vercel's framework-defined infrastructure and Edge Network for performance and business growth, and the use of Vercel Speed Insights for optimization.

Recap: Next.js Conf 2024

10/25/2024

This post announces the stability of Turbopack for development, highlighting up to 90% faster code updates. It also details changes to Next.js 15's caching semantics, making GET Route Handlers and the Client Router Cache uncached by default, and introduces the `expireTime` configuration in `next.config.js` for improved self-hosting and CDN control.

How Vercel adopted microfrontends

10/22/2024

This post details Vercel's adoption of vertical microfrontends for its main website and dashboard. It explains the rationale behind the shift from a monolithic Next.js application to address growing build times and dependency complexity. The post outlines the choice between horizontal and vertical microfrontend splits, detailing Vercel's decision to adopt vertical microfrontends for their specific use case. It describes the migration path, breaking down the application into marketing, documentation, and the logged-in dashboard, and leveraging Next.js Multi-Zones. The use of Turborepo, Dependency Cruiser, and feature flags for incremental migration and traffic routing is highlighted. The benefits include improved developer experience, reduced build times, and enhanced end-user performance.

Turbopack updates: Moving homes

7/23/2024

This post announces the migration of the Turbopack bundler codebase from the `vercel/turbo` repository into the `vercel/next.js` monorepo. This strategic move is intended to improve development velocity and iteration speed by co-locating Turbopack with its primary user, Next.js. The post details the current progress of Turbopack, including its passing of the Next.js development test suite and compatibility with npm packages. It also outlines the technical rationale for the move, such as simplifying dependency management and cross-repository coordination, and discusses the migration strategy using `git-subtree` and `git-filter-branch`. Future priorities for Turbopack development are also highlighted, focusing on bug resolution, memory optimization, persistent caching, and production build support.

2023

How to scale a large codebase

11/16/2023

This post details how Vercel recommends scaling large codebases using a monorepo architecture, emphasizing the role of Turborepo for build system performance and caching. It also discusses the importance of feature flags for safe releases, recommending Vercel Edge Config for low-latency flag storage, and highlights incremental builds with Turborepo for de-risking experimentation by reusing cached work and only running changed code. Recommendations include Turborepo for monorepo tooling and build scripts, pnpm as a package manager, and Vercel Conformance tooling.

Building the most ambitious sites on the Web with Vercel and Next.js 14

11/6/2023

This post announces the stable release of Server Actions in Next.js 14, experimental Partial Prerendering, and significant performance improvements in Next.js startup and code updates (22% and 29% respectively). It also highlights Turbopack's performance gains (53.3% faster startup, 94.7% faster code updates) and the ongoing migration of the Next.js CLI and bundler to Rust. The post emphasizes the adoption of the App Router and Server Components by major companies and showcases how these features improve performance and developer experience.

Using Zig in our incremental Turborepo migration from Go to Rust

9/8/2023

This post details an incremental migration strategy for porting Turborepo's core commands (`run` and `prune`) from Go to Rust. It introduces the "Rust-Go-Rust sandwich" (or "Go sandwich") architecture, where a Rust binary calls a Go binary which, in turn, calls statically linked Rust libraries. This approach uses protobuf for inter-language communication and Go build tags to enable toggling between Go and Rust implementations. The post also outlines a specific example of porting environment variable handling for the global hash calculation.

Engineering a site at the speed of breaking news | Customers | Vercel

7/27/2023

This post details The Washington Post's migration to Next.js and Vercel for their election engineering platform. Key technical aspects include: replacing an AWS ECS-based rendering layer with Vercel, migrating to Next.js 12 to utilize Incremental Static Regeneration (ISR), hosting both development and production environments on Vercel, rewriting the frontend in TypeScript, and improving test coverage. The post highlights Vercel's ability to handle spiky traffic and streaming data, enabling scalability and responsiveness. A specific technical challenge addressed was a lagging WebSocket solution for a high-data-load page, which was rewritten successfully. The migration aimed to reduce complexity, improve developer onboarding, and lower costs compared to their previous AWS infrastructure.

How Vercel helped this popular health database increase free trials by 284% | Customers | Vercel

7/25/2023

This post details how Examine.com migrated to Vercel's Frontend Cloud, resulting in a 90% reduction in build times (from 15-20 minutes to 1-2 minutes) and a 284% increase in free trial signups. Key technical improvements include decoupling frontend and backend, leveraging Next.js for dynamic loading and prefetching, and utilizing Incremental Static Regeneration (ISR), Server-Side Rendering (SSR), and Preview Deployments for faster iteration and improved developer workflow.

How Turborepo is porting from Go to Rust

7/21/2023

This post details the strategy and technical challenges of porting Turborepo from Go to Rust, focusing on an incremental porting approach using CGO for inter-language communication and JSON serialization for argument passing. It highlights the implementation of global `turbo` and CLI argument parsing in Rust, and the resolution of platform-specific issues like Windows toolchain compatibility and path handling.

Incrementally adopting Next.js at one of Europe's fastest growing brands | Customers | Vercel

6/23/2023

This post details reMarkable's incremental migration from Gatsby to Next.js and Vercel, focusing on the technical aspects of improving developer experience and performance. Key technical contributions include: achieving an 87% reduction in production build times (from 5m 55s to 39s) by adopting Next.js; improving development build startup times; leveraging Vercel Preview Deployments for faster stakeholder review cycles and feedback collection; and enabling a self-sufficient editorial team by integrating Sanity for custom landing page creation without developer intervention. The migration strategy involved modifying the website structure, moving to a pages folder, lifting data fetching to the pages-level, and rewriting queries before swapping frameworks.

How Neo Financial cut time spent on infrastructure admin by 50% | Customers | Vercel

6/22/2023

This post details how Neo Financial migrated from a self-managed AWS Fargate infrastructure to Vercel's Frontend Cloud. Key technical achievements include a 77% improvement in page load speed through Next.js server rendering, the use of Edge Middleware for real-time translations, and a 50% reduction in infrastructure administrative effort. The migration also highlights the benefits of Vercel's Preview Deployments for faster release cycles and collaboration, and the platform's inherent scalability and security for a financial services application.

CORE Construction builds excellence with Vercel | Customers | Vercel

4/18/2023

CORE Construction migrated their internal Business Insights (BI) tool from AWS to Vercel, improving stability, reliability, and performance. They leveraged Static Site Generation (SSG) and Server Side Rendering (SSR) for faster page delivery and Preview Deployments for a better feedback loop, leading to weekly releases and faster development cycles. Upgrading Next.js versions from 10 to 12 reduced build times from 30 minutes to 14 minutes.

Containing multi-site management within a single codebase | Customers | Vercel

4/12/2023

This post details how Wunderman Thompson uses a monorepo workflow with Turborepo, combined with Atomic Design principles and a headless CMS, to manage multiple client websites from a single codebase on Vercel's serverless platform. It highlights the benefits of component-based frameworks like Next.js and SvelteKit for efficient development, streamlined data management, and infrastructure automation.

Why Turborepo is migrating from Go to Rust

3/7/2023

This post details the migration of Turborepo from Go to Rust. It explains the motivations behind this decision, highlighting Rust's advantages in correctness, compile-time error catching, and its ecosystem for interfacing with native libraries (e.g., zstd, libgit2) without global toolchain changes. The post contrasts Go's simplicity and runtime error handling with Rust's explicit complexity and compile-time safety, using file permissions as an example. It also notes the alignment with the Turbopack team's use of Rust and the positive impact on developer happiness and the broader web development community's adoption of Rust.

Optimizing performance for over 6M monthly visitors at CruiseCritic | Customers | Vercel

2/24/2023

This post details Cruise Critic's migration from a monolithic PHP application to Next.js and Vercel. Key technical outcomes include a reduction in engineering build times from 30 minutes to under eight minutes, enabling multiple deployments per day. Page performance saw an 85% decrease in download time and a nearly 100% decrease in page size.

Moving from monolithic WordPress to composable gives Plenti total freedom | Customers | Vercel

2/23/2023

This post details Plenti's successful migration from a monolithic WordPress stack to a composable Next.js frontend on Vercel, managed by a single engineer. It highlights the flexibility and speed of Next.js, the utility of the Vercel API for triggering deployments via a Strapi plugin, and the value of Vercel Analytics (specifically Real Experience Score) for optimizing user experience.

How Makeswift improved CI speed by 65% with Turborepo | Customers | Vercel

2/22/2023

This post details how Makeswift, a Vercel customer, achieved a 65% improvement in their CI pipeline speed and reduced their commit-to-deploy time from 20 minutes to under one minute by adopting Turborepo. The post highlights Makeswift's previous challenges with a custom Bazel and Kubernetes setup and contrasts it with the ease of integration and immediate performance gains provided by Turborepo for tasks like linting, typechecking, and building. It also mentions future exploration of Vercel Edge Middleware for multi-tenancy and internal packages.

How Vercel and Next.js keep Rippling on their rising path to success | Customers | Vercel

2/22/2023

This post details how Rippling, an HR platform, successfully scaled its frontend by adopting Next.js and Vercel. It highlights the benefits of Incremental Static Regeneration (ISR) for rapid content updates (sub-300ms propagation) and maintaining fast build times as the application grows. The post emphasizes how this stack empowers stakeholders to deploy over 90% of site changes immediately, freeing up engineering resources for performance improvements.

How Indent delivers secure access with Next.js and Vercel | Customers | Vercel

2/17/2023

This post highlights how Indent uses Next.js and Vercel for a fast end-user experience and improved developer workflow. Key contributions include: 1. Leveraging Preview Deployments for faster feedback loops (80% improvement), enabling real-time sharing and commenting on work-in-progress. 2. Benefiting from Next.js's zero-migration features (Webpack 5, SWC compiler, built-in TypeScript and linting) for quality-of-life improvements and easier security patching. 3. Utilizing Vercel's platform with modern CMS like Sanity for non-technical team members to contribute content without code changes, with Preview Deployments ensuring fast feedback on content updates.

Less code, better UX: Fetching data faster with the Next.js 13 App Router

2/10/2023

This post details the data fetching improvements in Next.js 13's App Router, focusing on React Server Components. It explains how data can be fetched directly within components, reducing boilerplate compared to the `pages` directory's `getServerSideProps` and `getStaticProps`. It highlights the benefits of Server Components for fetching data on the server, improving security and reducing client-server roundtrips. The post also explains how `fetch()` is now static by default, with options for revalidation and `no-store` for dynamic data, leveraging the Web API and async/await.

Runway enables next-generation content creation with AI and Vercel | Customers | Vercel

2/10/2023

This post details Runway's migration to Vercel, highlighting a significant reduction in build times from 5-8 minutes to 40 seconds. It also mentions the use of Vercel Preview Deployments for improved feedback cycles and Vercel Analytics for performance monitoring.

Moving from Gatsby to Next.js

2/9/2023

This post details a migration from Gatsby to Next.js for a large-scale React website, highlighting the benefits of Vercel's platform in facilitating this transition. Key technical contributions include: - Demonstrating Vercel's role in enabling safe migrations via preview deployments and instant rollbacks. - Showcasing how Vercel's infrastructure supports incremental adoption and headless CMS integration. - Quantifying performance improvements using Vercel Analytics and Checks, with a Real Experience Score improvement from 79 to 90. - Contrasting Next.js's full-stack capabilities and integrated solutions (e.g., `next/image`) with Gatsby's plugin-dependent approach for features like image optimization, reducing code lines and dependencies. - Explaining Next.js's simplified data fetching (`fetch` and `getStaticProps`) compared to Gatsby's multi-layered approach (plugins, `gatsby-config.js`, `gatsby-node.js`), emphasizing colocation and flexibility beyond GraphQL. - Detailing the significant reduction in build times (from 35 minutes to 5 minutes) by adopting a hybrid approach with Next.js's Incremental Static Regeneration (ISR) for a large number of static pages, balancing initial load times with CDN caching for subsequent users. - Reporting a successful migration in three weeks with zero downtime and an 85% reduction in build times.

Iterate faster with Turborepo and Vercel Remote Cache

2/7/2023

This post introduces the integration of Turborepo with Vercel Remote Cache, enabling shared build caches across development teams and CI/CD systems. It details how to set up and use this integration, highlighting the potential for significant reductions in CI times (up to 85%) and faster developer iteration. The post also visualizes the time saved through cache hits and mentions the ability to cache Nx and Rush remotely using the Vercel Remote Cache SDK.

Supabase improves their DX with Turborepo | Customers | Vercel

1/24/2023

This post details how Supabase adopted Turborepo to improve their monorepo development experience. Key improvements include simplifying UI component updates by eliminating the need for separate npm releases, enabling single-file updates and pull requests for contributions, and allowing the entire system to be run locally with a single command. It also highlights the integration with Vercel Preview Deployments for collaboration.

How Vercel enables Wunderman Thompson to launch global brands | Customers | Vercel

1/17/2023

This post details how Wunderman Thompson leverages Turborepo's monorepo and remote caching for their UI kit, enabling fast development cycles and component sharing. It also highlights their use of Vercel's integrations ecosystem for headless CMS integration and Vercel Comments for fluid collaboration on live sites, transforming feedback processes from week-long back-and-forths to same-day deploys. The post also emphasizes the benefits of Vercel's globally serverless infrastructure and Vercel Checks for managing projects without server maintenance and catching site-breaking errors before launch.

The Turbopack vision

1/11/2023

This post announces the alpha release of Turbopack, a new bundler designed to replace webpack. It details the motivation for building Turbopack, highlighting the limitations of webpack's decade-old architecture. The post introduces the 'Turbo engine' for caching and incremental builds, and Turbopack itself, which leverages SWC for bundling various assets. It mentions key features like millisecond hot reloads and the potential for seconds-long production builds with remote caching. New alpha features in Next.js 13.1 are listed, including support for PostCSS, next/image, next/font, and next.config.js. The future roadmap includes production builds, support for other frameworks, and enhanced developer insights.

2022

How Remote Caching decreased publish times by 80%

12/22/2022

This post details the implementation of Turborepo Remote Caching to address increased CI build times for Next.js due to the inclusion of Rust binaries for SWC. Previously, caching SWC binaries in CI yielded only moderate results due to high cache miss rates and platform handling differences. Turborepo Remote Caching solves this by providing per-platform task management, eliminating cache purges through robust hashing, and enabling eager pre-seeding of the remote cache via GitHub Actions. This resulted in an 80% reduction in Next.js publish times.

Building a viral application for your personal music festival

12/12/2022

This post details how Instafest, built with Next.js, scaled to 500,000 users per hour by leveraging Vercel's automatic scaling, global Edge Network for caching, and Vercel Functions, demonstrating robust performance and availability. It highlights the use of Next.js's built-in font optimization and image component for fast loading and responsive images, and Vercel's ability to handle massive traffic surges with zero downtime or increased latency.

Migrate a large, open-source React application to Next.js and Vercel

12/8/2022

This post details the incremental migration of a large, open-source React application (BBC website) to Next.js and Vercel. Key technical contributions include: setting up Next.js with Emotion, configuring Webpack for import aliases and timezone data handling, adapting to Next.js's routing and data fetching mechanisms (getInitialData), and leveraging Vercel's preview deployments. The migration resulted in significant code reduction and improved local development iteration speed.

DatoCMS builds 60% faster with a streamlined workflow | Customers | Vercel

11/30/2022

This post details how DatoCMS, a headless CMS provider, achieved a 60% reduction in build times by migrating to Next.js on Vercel. They were able to leverage both Static Generation and Server-Side Rendering, which was previously a limitation. The migration also streamlined their workflow by consolidating build, preview, and deploy processes onto a single platform, leading to the creation of their Realtime Updates API.

How Vercel helped justInCase Technologies cut their build time in half | Customers | Vercel

11/30/2022

This post details how justInCase Technologies migrated to Vercel, experiencing 50% faster builds and eliminating preview failures. This resulted in 72 hours of saved developer time per month, enabling them to manage more products, build a new blog, and achieve a 100 score on PageSpeed Insights. The integration of GitHub Actions on Vercel further automated their workflow.

With Next.js, Vercel, and Sanity, Loom empowers every team to iterate | Customers | Vercel

11/30/2022

This post details how Loom uses Next.js on Vercel with Sanity for a headless architecture, emphasizing fast iteration and collaboration. Key technical aspects include the use of preview deployments for content creators and stakeholders to test changes without engineering intervention, ensuring design system integrity. It also highlights image optimization using the Next.js Image Component and Vercel's Edge optimization to improve user experience and page load times.

Monorepos are changing how teams build software

3/3/2022

This post introduces the concept of monorepos and highlights Turborepo as a solution for adopting them at scale. It explains the advantages of monorepos, including easier package updates, collaboration, local development, and faster builds with remote caching. It positions Turborepo as a tool that brings the development workflows of large organizations to open source, abstracting configuration and enabling faster iteration.

Monorepos are changing how teams build software

3/3/2022

This post introduces the concept of monorepos and highlights Turborepo as a solution for enabling them at scale. It details the advantages of monorepos, including easier package updates, collaboration, local development, and faster builds with remote caching. It positions Turborepo as a tool that abstracts complex configuration for monorepos, providing fast, incremental builds with zero-configuration remote caching.

2021

Vercel acquires Turborepo to accelerate build speed and improve developer experience

12/9/2021

Vercel acquired Turborepo, a high-performance build system for JavaScript and TypeScript codebases. The acquisition makes Turborepo's CLI open source and integrates its capabilities with Vercel's infrastructure for task sharing, aiming to improve build speeds and developer experience for monorepos.