{
  "id": 19585855,
  "title": "Slow Unity IL2CPP Builds Usually Come in Three Kinds",
  "url": "https://urgent.news/2026/11/12/slow-unity-il2cpp-builds-usually-come-in-three-kinds",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-12T02:16:45.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/echolin/slow-unity-il2cpp-builds-usually-come-in-three-kinds-298h"
  },
  "original_language": "en",
  "account": "Three distinct categories of slow Unity IL2CPP builds exist, each with its own cause and remedy. The first type occurs only during the initial build. This is due to Unity's incremental build pipeline, which reuses work from previous builds, storing most of the cache in Library/Bee. For CI runners, starting from a fresh checkout means reprocessing everything, so it's crucial to persist the Library/Bee folder between runs.\n\nThe second category encompasses builds that consistently take longer than usual. In such cases, certain settings can be adjusted to speed up the process. When working on iterative builds, it's recommended to set the C++ Compiler Configuration to Debug mode and the IL2CPP Code Generation to Optimize for code size and build time. Additionally, only build the architecture that matches your test device. It's worth noting that these settings may compromise performance in the final shipped game, so they should be avoided in the build intended for release. Unity also advises excluding the project and build folders from antivirus scans and utilizing the fastest available disk, as IL2CPP performs extensive read and write operations.\n\nThe third type of slow build typically arises after a period of normal performance. This usually indicates that the cache has stopped being reused, resulting in full rebuilds each time. Potential culprits include a build script or CI job that inadvertently triggers a clean build cache, the absence of a ScriptsOnlyCache.yaml or DataBuildDirtyInfo.json file in Library/PlayerDataCache, or external factors like cleanup scripts or sync tools modifying Library. One forum user experienced a dramatic slowdown from around 30 seconds to 20 minutes, only to be told that the cache was somehow being cleared without explanation.\n\nTo determine which scenario applies, examine the IL2CPP stages in the Editor log. They appear as \"Compiling cpp for libil2cpp\" and, on Windows, \"Linking GameAssembly.dll.\" The first build is expected to be slow due to the lack of cached work, while every subsequent build should be faster if the cache is functioning correctly. If the cache appears to be the issue, review your build scripts and CI jobs, ensuring no unintended clean cache actions are being taken.",
  "summary": "Reading through Unity forum threads about slow IL2CPP builds, I noticed people describe a few different problems with the same words. \"IL2CPP is slow\" can mean very different things, and the fix depends on which one you have. Before anything else, check that IL2CPP is actually the slow step. A player build also compiles shaders, and one developer on the Unity forums found that 3 to 4 hours of a…",
  "key_points": [],
  "editors_take": "Distinguishing between initial compilation, configuration settings, and cache failures allows developers to implement specific optimizations that prevent unnecessary build delays during iterative development cycles.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}