# 05.提高编译速度

## forward declaration

* 使用`@class ClassName`而不是`#import ClassName.h`
* 能大大提高编译速度

## 组件库打包优化

* 对不经常变更的库做成`Framework`或者`.a`
* 这部分代码就不需要重新编译了

## 常用头文件放到预编译文件里

* XCode的pch文件是预编译文件，这里的内容在执行XCode build之前就已经被预编译，并且引入到每一个.m文件里了。

## Debug模式下不生成dsym文件

## 开启编译当前架构版本

## Debug模式下关闭编译优化

![](https://img-blog.csdn.net/20161206231413542?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvSGVsbG9fSHdj/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)

## 参考

> <https://blog.csdn.net/Hello_Hwc/article/details/53557308>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ryukiedev.gitbook.io/wiki/ios/you-hua/05.-ti-gao-bian-yi-su-du.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
