Small File Overhead

iOS

Hundreds of tiny files wasting space due to APFS 4 KB block allocation. A 100-byte file still consumes 4,096 bytes on disk.

APFS uses a fixed 4 KB block size. Every file, regardless of actual content size, occupies at least one full 4 KB block on disk. A file containing 100 bytes still consumes 4,096 bytes. When an app bundles hundreds of files smaller than 4 KB, the cumulative waste becomes significant. Additionally, every file adds an entry to _CodeSignature/CodeResources, which alone can exceed 5 MB for apps with 10,000+ files.


Why this happens

  • Localization files (.strings, .stringsdict). An app supporting 30 languages with 5 string tables each has 300+ files, many under 4 KB.

  • Property lists (.plist). Each embedded framework contributes its own Info.plist.

  • JSON configuration files from SDKs bundling small config files.

  • Small image files like navigation bar icons and tab bar icons (50-200 bytes as small PNGs).

  • Compiled NIB/storyboard files decomposed into individual view controller NIBs.


Size impact

Apple's App Thinning Size Report does not account for filesystem block allocation, making this waste invisible in standard tooling.

Candy Crush Saga

20,000+ files under 4 KB, ~50+ MB potential savings

Wells Fargo

26.7 MB (~12%) from asset catalog migration

~700 small files

~1.7 MB waste from block allocation alone


How we detect it

Scans all files in the bundle and identifies those smaller than 4 KB. Excludes files in .framework/ directories, compiled asset catalogs, binaries, and compiled UI resources. Files are grouped by extension. Reports groups with 3+ files AND total waste >= 10 KB. Severity: High (>= 100 files or >= 100 KB waste), Medium (>= 20 files or >= 20 KB), Low (below thresholds).


How to fix

1

Move images into Asset Catalogs

All images compile into a single .car file, eliminating per-file overhead entirely.

2

Consolidate small files

Merge multiple JSON configs into one. Combine level data into a single indexed archive or SQLite database.

3

Reduce string table count

Fewer, larger .strings files are better than many small ones.

4

Use binary property lists

~17% smaller than XML plists. Xcode typically handles this conversion at build time.

5

Reduce framework count

Each framework adds its own Info.plist, CodeResources, and directory structure. Static linking eliminates per-framework file overhead.


Powered by Bitrise, trusted by 8,500+ brands

Size Analyzer is built by Bitrise, the leading mobile DevOps platform used by over 400,000 developers at companies like Shopify, TripAdvisor, and BuzzFeed. Free forever. No signup required.

Bitrise provides a full-stack mobile DevOps solution that unites the tools, processes, and testing frameworks engineering teams need to ship best-in-class mobile experiences.

Bitrise logo