<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-i-reduced-the-size-of-my-docc-documentation-with-95--kwstdudkk" -->

---
title: How I reduced the size of my DocC documentation with 95%
description: The KeyboardKit documentation build used to generate about 900 MB and 160,000+ files because DocC, by default, documents synthesized members—including every...
canonical: https://daily.dev/posts/how-i-reduced-the-size-of-my-docc-documentation-with-95--kwstdudkk
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How I reduced the size of my DocC documentation with 95% | daily.dev
og:description: The KeyboardKit documentation build used to generate about 900 MB and 160,000+ files because DocC, by default, documents synthesized members—including every...
og:url: https://daily.dev/posts/how-i-reduced-the-size-of-my-docc-documentation-with-95--kwstdudkk
og:image: https://api.daily.dev/og/posts/KwSTdudKK.png
og:image:alt: How I reduced the size of my DocC documentation with 95%
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How I reduced the size of my DocC documentation with 95%

**[Daniel Saidi](https://daily.dev/sources/danielsaidi)** · 3 min read · 0 upvotes · 1 comments

## Summary

The KeyboardKit documentation build used to generate about 900 MB and 160,000+ files because DocC, by default, documents synthesized members—including every SwiftUI view modifier inherited by each view. Enabling the DOCC_SKIP_SYNTHESIZED_MEMBERS build setting (passed to xcodebuild docbuild or set in Xcode project settings) skips these inherited members while still documenting all custom types and members. For KeyboardKit, this cut a 929-page view down to 9 pages and shrank the overall documentation output to roughly 45 MB, a 95% reduction, without losing any authored content. The author also updated their SwiftPackageScripts tool to skip synthesized members by default, with an opt-in flag to include them when needed.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://danielsaidi.com/blog/2026/10/01/how-i-reduced-the-size-of-my-docc-documentation-with-95>

## Questions this post answers

### How do I reduce the size of my DocC documentation build for a Swift package with SwiftUI views?

Pass DOCC_SKIP_SYNTHESIZED_MEMBERS=YES to xcodebuild docbuild, or enable it in Xcode project build settings. This tells DocC to skip synthesized members, such as SwiftUI view modifiers inherited through protocol extensions, while still documenting all types and members you actually define. One SDK's documentation shrank from about 900 MB to 45 MB using this setting.

_daily.dev surfaces practical build tweaks like this for developers wrangling bloated DocC output._

### Why does my DocC documentation generate hundreds of pages for a single SwiftUI view?

By default DocC documents synthesized members, meaning every SwiftUI view modifier a view inherits from protocol extensions gets its own documentation page. A single small SwiftUI view ended up with 929 documentation pages, almost all of them inherited modifiers rather than custom APIs, because every view inherits every view modifier in SwiftUI.

_Developers debugging bloated Swift documentation builds can keep up with fixes like this via daily.dev._

### What does the DOCC_SKIP_SYNTHESIZED_MEMBERS Xcode build setting do?

It instructs DocC to exclude synthesized members, such as inherited protocol extension members and SwiftUI view modifiers, from generated documentation, while still including every type and member explicitly defined in the code or its extensions. Applying it to a large SwiftUI-based SDK cut one view's page count from 929 to 9 and reduced total documentation size by 95%.

_daily.dev helps Swift developers track build setting changes that affect DocC output and tooling._

## Community discussion

Top comments from developers on daily.dev.

**@nark3d** · 0 upvotes

> This being a build setting rather than a custom generation pipeline is what I like, because skipping synthesized members keeps the authored content intact and drops the inherited noise.  Inherited SwiftUI modifiers were never documentation the author wrote, they were the compiler's surface area getting rendered as if it were theirs.  Defaulting to off in SwiftPackageScripts saves the next person from rediscovering the 929 page view first.

## Similar posts on daily.dev

- [Just a Few Keystrokes -- Fatbobman's Swift Weekly \#151](https://daily.dev/posts/just-a-few-keystrokes----fatbobman-s-swift-weekly-151-slajtgpn2) · Fatbobman · 0 upvotes · 0 comments
- [Create your keyboard for App theme: Customizing Keyboard in SwiftUI](https://daily.dev/posts/create-your-keyboard-for-app-theme-customizing-keyboard-in-swiftui-9x2zf2yf5) · Medium · 0 upvotes · 0 comments
- [How I Documented an Entire Product in 4 Days with an AI Agent](https://daily.dev/posts/how-i-documented-an-entire-product-in-4-days-with-an-ai-agent-nolsdvxdj) · DEV · 30 upvotes · 1 comments
- [we rolled our own documentation site](https://daily.dev/posts/we-rolled-our-own-documentation-site-yhxa7hjso) · Lobsters · 1 upvotes · 0 comments

---

Tags: [#swift](https://daily.dev/tags/swift), [#swiftui](https://daily.dev/tags/swiftui), [#xcode](https://daily.dev/tags/xcode)

[View this post on daily.dev](https://daily.dev/posts/how-i-reduced-the-size-of-my-docc-documentation-with-95--kwstdudkk)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How I reduced the size of my DocC documentation with 95%","url":"https://daily.dev/posts/how-i-reduced-the-size-of-my-docc-documentation-with-95--kwstdudkk","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-i-reduced-the-size-of-my-docc-documentation-with-95--kwstdudkk"},"datePublished":"2026-10-01T09:45:50.863Z","dateModified":"2026-10-01T09:46:12.977Z","description":"The KeyboardKit documentation build used to generate about 900 MB and 160,000+ files because DocC, by default, documents synthesized members—including every...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/54be5af63e816f7dccfae8761fe4b281?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/54be5af63e816f7dccfae8761fe4b281?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Daniel Saidi","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Daniel Saidi","logo":"https://media.daily.dev/image/upload/s--RRuTMOCm--/f_auto,q_auto/v1783235599/logos/danielsaidi?_a=BAMAMicg0","url":"https://daily.dev/sources/danielsaidi"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/how-i-reduced-the-size-of-my-docc-documentation-with-95--kwstdudkk","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"swift,swiftui,xcode","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Daniel Saidi","item":"https://daily.dev/sources/danielsaidi"},{"@type":"ListItem","position":3,"name":"How I reduced the size of my DocC documentation with 95%"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/how-i-reduced-the-size-of-my-docc-documentation-with-95--kwstdudkk","comment":[{"@type":"Comment","text":"This being a build setting rather than a custom generation pipeline is what I like, because skipping synthesized members keeps the authored content intact and drops the inherited noise.  Inherited SwiftUI modifiers were never documentation the author wrote, they were the compiler’s surface area getting rendered as if it were theirs.  Defaulting to off in SwiftPackageScripts saves the next person from rediscovering the 929 page view first.","datePublished":"2026-10-05T10:33:31.949Z","url":"https://daily.dev/posts/KwSTdudKK#c-ApHn6X7M4","author":{"@type":"Person","name":"Adam","url":"https://daily.dev/nark3d","image":"https://avatars.githubusercontent.com/u/2162621?v=4"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-i-reduced-the-size-of-my-docc-documentation-with-95--kwstdudkk#faq","mainEntity":[{"@type":"Question","name":"How do I reduce the size of my DocC documentation build for a Swift package with SwiftUI views?","acceptedAnswer":{"@type":"Answer","text":"Pass DOCC_SKIP_SYNTHESIZED_MEMBERS=YES to xcodebuild docbuild, or enable it in Xcode project build settings. This tells DocC to skip synthesized members, such as SwiftUI view modifiers inherited through protocol extensions, while still documenting all types and members you actually define. One SDK's documentation shrank from about 900 MB to 45 MB using this setting. daily.dev surfaces practical build tweaks like this for developers wrangling bloated DocC output."}},{"@type":"Question","name":"Why does my DocC documentation generate hundreds of pages for a single SwiftUI view?","acceptedAnswer":{"@type":"Answer","text":"By default DocC documents synthesized members, meaning every SwiftUI view modifier a view inherits from protocol extensions gets its own documentation page. A single small SwiftUI view ended up with 929 documentation pages, almost all of them inherited modifiers rather than custom APIs, because every view inherits every view modifier in SwiftUI. Developers debugging bloated Swift documentation builds can keep up with fixes like this via daily.dev."}},{"@type":"Question","name":"What does the DOCC_SKIP_SYNTHESIZED_MEMBERS Xcode build setting do?","acceptedAnswer":{"@type":"Answer","text":"It instructs DocC to exclude synthesized members, such as inherited protocol extension members and SwiftUI view modifiers, from generated documentation, while still including every type and member explicitly defined in the code or its extensions. Applying it to a large SwiftUI-based SDK cut one view's page count from 929 to 9 and reduced total documentation size by 95%. daily.dev helps Swift developers track build setting changes that affect DocC output and tooling."}}]}
```

