You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**set_hmap_black_pod_list:**开发插件的时候发现有些Pod target使用预生成的hmap编译会出错,比如使用了`#import "a/very/very/long/path/to/header.h"`,暂时没想到好的解决方案,所以针对这种情况需要手动添加到黑名单,不对该target的进行处理,如:`set_hmap_black_pod_list(['PodA','PodB'])`,插件内置了一些这种情况的三方库,具体见:[built-in black list](/lib/cocoapods-project-hmap/podfile_dsl.rb)。如果你还有其他的三方库由于其他原因编译失败,也可以把它添加到黑名单。。。
Copy file name to clipboardExpand all lines: README_en.md
+9-51Lines changed: 9 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -2,56 +2,14 @@
2
2
3
3
A cocoapods plugin to improve compilation speed at preprosessor phase by using hmap instead of file paths for header searching. The idea comes from [《一款可以让大型iOS工程编译速度提升50%的工具》](https://tech.meituan.com/2021/02/25/cocoapods-hmap-prebuilt.html)
4
4
5
-
## Benchmark
6
-
7
-
There are some test cases in the benchmark project : [hmap-benchmark](https://github.com/chenxGen/hmap-benchmark/).
8
-
9
-
The latest outputs by running `run_benchmark.rb` are:
The outputs indicate that this plugin has about 3%-36% build speed improvement, the improvement is not significant on mac using M1 processor because of Apple M1 processor's high IO performance (I GUESS...).
53
-
54
-
**So if you are using Mac with Apple M1 processor, There may be no need to use this plugin.**
5
+
## First
6
+
7
+
What kind of projects are recommended to use this plugin?
8
+
9
+
-**Project using objective-c as their main develop language**
10
+
-**Project not using `use_frameworks!` and `use_modular_headers!` in their Podfile**
11
+
12
+
and Developer not using Mac with M series CPU.
55
13
56
14
## Requirement
57
15
@@ -69,7 +27,7 @@ In your `Podfile`, add this line : `plugin 'cocoapods-project-hmap'`
69
27
70
28
And this plugin also provides Podfile DSL bellow:
71
29
72
-
-`set_hmap_black_pod_list`: There are some unsolved situation in develping this plugin, such as a 'pod' using a long path import in their code, like `#import "a/very/very/long/path/to/header.h"`, I did not think of a suitable strategy to handle this, so I provide a method to adding then to black list, you can add then with code `set_hmap_black_pod_list(['PodA','PodB'])`, and there are some built-in 'pod' in black list, see : [built-in black list](/lib/cocoapods-project-hmap/podfile_dsl.rb). And if you have some other build error because of this plugin, adding then to black list...
30
+
-`set_hmap_black_pod_list`: If you have some compilation error for pod targets because of this plugin, adding the target name to black list...
73
31
-`turn_prebuilt_hmap_off_for_pod_targets`: If you have to many build error after using this plugin, or have to add to many 'pod' to black list, I provides a most non-intrusive way to use, call this method `turn_prebuilt_hmap_off_for_pod_targets` to ignore hmap prebuilt for most of the pod target (excepting the 'main' pods, named `Pods-${YOUR SCHEME}`).
74
32
-`set_hmap_use_strict_mode`: Import a header in other library(PodA), strictly speaking, we should use `#import <PodA/Header.h>`, but not all library developer do like that, if you turn it on, you can find then.
0 commit comments