Mozilla Automation TeamJonathan Almeida1 min readintermediate
Perf wins from relocating MOZ_OBJDIR have a dev experience cost
Summary
Moving the Firefox build output directory (MOZ_OBJDIR) out of the source tree speeds up IDE indexing by removing massive artifact trees. The downside is that generated code shows up as missing symbols, so developers must balance indexing performance against code navigation.
- Relocating MOZ_OBJDIR out of the source tree (e.g., to ~/.mozbuild) cuts IDE indexing time by keeping large build artifact trees out of the project view.
- The trade‑off is that generated code appears as missing (red) symbols, hurting code navigation.
- Objdirs can grow to tens of gigabytes and hundreds of thousands of files, which IDEs struggle to index.
- A practical mitigation is to clean up stale objdirs rather than permanently relocate them.
Mozilla or large C++ monorepo developers who rely on IDE indexing should care because relocating objdirs can improve IDE responsiveness but may degrade code visibility.
5/10
