Skip to content

Commit d15f8d6

Browse files
author
Luc Dion
committed
Update charts and add iPhone X
1 parent 20c83a5 commit d15f8d6

14 files changed

Lines changed: 51 additions & 19 deletions

File tree

LayoutFrameworkBenchmark.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@
398398
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
399399
GCC_WARN_UNUSED_FUNCTION = YES;
400400
GCC_WARN_UNUSED_VARIABLE = YES;
401+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
401402
MTL_ENABLE_DEBUG_INFO = YES;
402403
ONLY_ACTIVE_ARCH = YES;
403404
SDKROOT = iphoneos;
@@ -448,6 +449,7 @@
448449
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
449450
GCC_WARN_UNUSED_FUNCTION = YES;
450451
GCC_WARN_UNUSED_VARIABLE = YES;
452+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
451453
MTL_ENABLE_DEBUG_INFO = NO;
452454
SDKROOT = iphoneos;
453455
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";

LayoutFrameworkBenchmark/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@
8989
"idiom" : "ipad",
9090
"filename" : "Icon-167.png",
9191
"scale" : "2x"
92+
},
93+
{
94+
"idiom" : "ios-marketing",
95+
"size" : "1024x1024",
96+
"scale" : "1x"
9297
}
9398
],
9499
"info" : {

LayoutFrameworkBenchmark/Benchmarks/BenchmarkViewController.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ class BenchmarkViewController: UITableViewController {
2424
return CollectionViewControllerFeedItemAutoLayoutView(data: data)
2525
}),
2626

27-
ViewControllerData(title: "FlexLayout", factoryBlock: { viewCount in
27+
ViewControllerData(title: "FlexLayout 1.3", factoryBlock: { viewCount in
2828
let data = FeedItemData.generate(count: viewCount)
2929
return CollectionViewControllerFeedItemFlexLayoutView(data: data)
3030
}),
3131

32-
ViewControllerData(title: "LayoutKit", factoryBlock: { viewCount in
32+
ViewControllerData(title: "LayoutKit 7.0", factoryBlock: { viewCount in
3333
let data = FeedItemData.generate(count: viewCount)
3434
return CollectionViewControllerFeedItemLayoutKitView(data: data)
3535
}),
@@ -39,7 +39,7 @@ class BenchmarkViewController: UITableViewController {
3939
return CollectionViewControllerFeedItemManualView(data: data)
4040
}),
4141

42-
ViewControllerData(title: "PinLayout", factoryBlock: { viewCount in
42+
ViewControllerData(title: "PinLayout 1.5", factoryBlock: { viewCount in
4343
let data = FeedItemData.generate(count: viewCount)
4444
return CollectionViewControllerFeedItemPinLayoutView(data: data)
4545
}),
@@ -101,7 +101,7 @@ class BenchmarkViewController: UITableViewController {
101101
func benchmarkCompleted(_ results: [Result]) {
102102
printResults(name: viewControllers[benchmarkIndex].title, results: results)
103103

104-
Timer.scheduledTimer(withTimeInterval: 0, repeats: false, block: { (_) in
104+
DispatchQueue.main.async {
105105
self.navigationController?.popViewController(animated: false)
106106

107107
benchmarkIndex += 1
@@ -110,7 +110,7 @@ class BenchmarkViewController: UITableViewController {
110110
} else {
111111
print("Completed!")
112112
}
113-
})
113+
}
114114
}
115115

116116
runBenchmark(viewControllerData: viewControllers[benchmarkIndex], logResults: false, completed: benchmarkCompleted)

Podfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ inhibit_all_warnings!
1111
target 'LayoutFrameworkBenchmark' do
1212
pod 'FlexLayout'
1313
pod 'LayoutKit'
14-
pod 'PinLayout'
14+
#pod 'PinLayout'
15+
pod 'PinLayout', :git => 'https://github.com/mirego/PinLayout.git', :commit => '41f0d47'
1516
pod 'Reveal-SDK'
1617
end

Podfile.lock

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,25 @@ PODS:
77
DEPENDENCIES:
88
- FlexLayout
99
- LayoutKit
10-
- PinLayout
10+
- PinLayout (from `https://github.com/mirego/PinLayout.git`, commit `41f0d47`)
1111
- Reveal-SDK
1212

13+
EXTERNAL SOURCES:
14+
PinLayout:
15+
:commit: 41f0d47
16+
:git: https://github.com/mirego/PinLayout.git
17+
18+
CHECKOUT OPTIONS:
19+
PinLayout:
20+
:commit: 41f0d47
21+
:git: https://github.com/mirego/PinLayout.git
22+
1323
SPEC CHECKSUMS:
1424
FlexLayout: 8cfa915850eab120c3d89c3b8b02e3aca96de554
1525
LayoutKit: 183c513f8322f4e22321499e54163864bcdf7d97
1626
PinLayout: b2ebf8622b28e82b6e1216ab4e4a0a8d082214fe
1727
Reveal-SDK: ccc2b0f8014965ea448b7534a7c2c8da232b75e8
1828

19-
PODFILE CHECKSUM: ae655f930c514ff23a524af2662b04f9eb65b4a4
29+
PODFILE CHECKSUM: 0b632096e0e587472c5a809521683004bf9e1942
2030

2131
COCOAPODS: 1.3.1

README.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Yoga's performance hasn't been tested directly, but FlexLayout has. FlexLayout i
6767
<br>
6868

6969
## Benchmark details
70-
The benchmark layout UICollectionView and UITableView cells in multiple pass, each pass contains more cells than the previous one.
70+
The benchmark layout UICollectionView cells in multiple pass, each pass contains more cells than the previous one.
7171

7272
## Benchmark cell's layout
7373
Here are the benchmark rendering results to compare visual results:
@@ -84,32 +84,46 @@ Here are the benchmark rendering results to compare visual results:
8484
# Results <a name="results"></a>
8585

8686
## Benchmark data
87-
You can see the benchmark's raw data in this [spreadsheet](docs_markdown/benchmark.xlsx).
87+
You can see the benchmark's data and charts in this **[Google Spreadsheet Document](https://docs.google.com/spreadsheets/d/1sUNdGWBM-d_W13yC7VcfkRXC3owCVsnIublnfW-4xn4/edit#gid=1032991425)**.
8888

8989
<br>
9090

9191
## Benchmark charts
9292

93+
94+
##### General comparison
95+
96+
This chart display a general comparison between device performance using each layout framework.
97+
It display the performance when layouting UICollectionView cells.
98+
99+
The **Y axis** indicates the **number of seconds** to render all cells.
100+
101+
<a href="docs_markdown/benchmark_comparison.png"><img src="docs_markdown/benchmark_comparison.png"/></a>
102+
<br>
103+
104+
##### Details for different devices
105+
93106
The **X axis** in following charts indicates the **number of cells** contained for each pass. The **Y axis** indicates the **number of seconds** to render all cells from one pass.
94107

95-
<p align="center">
96-
<a href="docs_markdown/benchmark_iphone7.png"><img src="docs_markdown/benchmark_iphone7.png"/></a>
108+
<a href="docs_markdown/benchmark_iphonex.png"><img src="docs_markdown/benchmark_iphonex.png"/></a>
109+
<br>
97110

98-
<p align="center">
99-
<a href="docs_markdown/benchmark_iphone6s.png"><img src="docs_markdown/benchmark_iphone6s.png"/></a>
111+
<a href="docs_markdown/benchmark_iphone8.png"><img src="docs_markdown/benchmark_iphone8.png"/></a>
112+
<br>
100113

101-
<p align="center">
102-
<a href="docs_markdown/benchmark_iphone6.png"><img src="docs_markdown/benchmark_iphone6.png"/></a>
114+
<a href="docs_markdown/benchmark_iphone7.png"><img src="docs_markdown/benchmark_iphone7.png"/></a>
115+
<br>
103116

104-
<p align="center">
105-
<a href="docs_markdown/benchmark_iphone5.png"><img src="docs_markdown/benchmark_iphone5.png"/></a>
117+
<a href="docs_markdown/benchmark_iphone6.png"><img src="docs_markdown/benchmark_iphone6.png"/></a>
118+
<br>
106119

120+
<a href="docs_markdown/benchmark_iphone5.png"><img src="docs_markdown/benchmark_iphone5.png"/></a>
107121
<br>
108122

123+
109124
## Project's TODO list
110125

111126
* Create a reference layout and update layout codes to match that reference.
112-
* Automate the benchmark to run all layout frameworks automatically.
113127
* Display benchmark charts inside the app and being to able to export them.
114128
* Export benchmark data to a spreadsheet.
115129
* Add more layout frameworks.

docs_markdown/benchmark.xlsx

-37.8 KB
Binary file not shown.
59.7 KB
Loading
-22 KB
Loading
-33.9 KB
Loading

0 commit comments

Comments
 (0)