File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ I changed to use ContiguousArray< UIViewController > type to store UIViewControllers in a contiguous block of memory.
2
+
3
+ When using a large number of UIViewControllers as tabs, I think that using ContiguousArray will yield more predictable performance compared to Array.
4
+
5
+
6
+
7
+ The changed files are:
8
+
9
+ - Sources/PagerTabStripViewController.swift
10
+
11
+ for Example:
12
+
13
+ - BarExampleViewController.swift
14
+ - ButtonBarExampleViewController.swift
15
+ - InstagramExampleViewController.swift
16
+ - NavButtonBarExampleViewController.swift
17
+ - SegmentedExampleViewController.swift
18
+ - SpotifyExampleViewController.swift
19
+ - TwitterExampleViewController.swift
20
+ - YoutubeExampleViewController.swift
21
+ - YoutubeWithLabelExampleViewController.swift
22
+
23
+
24
+
25
+ References
26
+
27
+ - https://github.com/apple/swift/blob/main/docs/Arrays.rst
28
+
29
+ - https://developer.apple.com/documentation/swift/contiguousarray
30
+
31
+ - https://github.com/apple/swift/blob/main/docs/OptimizationTips.rst#advice-use-contiguousarray-with-reference-types-when-nsarray-bridging-is-unnecessary
32
+
33
+ - http://jordansmith.io/on-performant-arrays-in-swift/
34
+ - https://medium.com/@nitingeorge_39047/swift-array-vs-contiguousarray-a6153098a5
You can’t perform that action at this time.
0 commit comments