Benchmark the performances of various Swift layout frameworks

Benchmark the performances of various Swift layout frameworks

Benchmark the performances of various Swift layout frameworks (autolayout, UIStackView, PinLayout, LayoutKit, FlexLayout, Yoga, ...)

Layout Framework Benchmark

Benchmark the performances of various Swift layout frameworks.

Requirements

  • iOS 8.0+
  • Xcode 8.0+
  • Swift 3.0+

History

This project is a spin-off of the excellent LayoutKit benchmark. The benchmark has been extracted to add other iOS layout frameworks and to compare them.

Why?

Choosing the right layout framework for your project is an important decision. The frameworks API is quite important, but its performance is also important. To help you with that decision, this benchmark compare different layout frameworks.

Benchmark charts

General comparison

This chart display a general comparison between device performance using each layout frameworks. It displays the performance when layouting UICollectionView cells. This graph shows performance when layouting 100 UICollectionView cells.

The Y axis indicates the number of seconds to render all cells.

Layout frameworks

The benchmark currently includes the following layout frameworks: (ordered alphabetically and use the framework GitHub's description):

Benchmark details

The benchmark layout UICollectionView cells in multiple pass, each pass contains more cells than the previous one.

Benchmark cell's layout

Here are the benchmark rendering results to compare visual results:

Benchmark data

You can see the benchmark's data and charts in this Google Spreadsheet Document.

Details for different devices

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.

Project's TODO list

  • Create a reference layout and update layout codes to match that reference.
  • Display benchmark charts inside the app and being to able to export them.
  • Export benchmark data to a spreadsheet.
  • Add more layout frameworks.
  • OSX support.
  • tvOS support.
  • ...

Contributing, comments, ideas, suggestions, issues, ....

For any comments, ideas, suggestions, simply open an issue.

If you'd like to contribute by adding other layout framework, you're welcomed!

Adding another layout framework

The process is currently tedious...

  • Add an implementation of the reference view.
  • Run on all reference devices (or at least the two latest generation) in Release mode.
  • Select the new layout from the Benchmark App.
  • Update the XLSX document.
  • Add a new chart
  • Save the chart using "Save as Picture..."
  • Update the README.md
  • Create a pull request.

Download Details:

Author: layoutBox

Source Code: https://github.com/layoutBox/LayoutFrameworkBenchmark

swift ios mobile-apps

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Top Swift iOS App Development Company in USA

AppClues Infotech is a top Mobile App Development Company in USA building high-quality Android, iOS, and Native apps for Startups, SMBs, & Enterprises. Contact us now!

How To Succeed In Mobile App Wireframe Design?

This article covers everything about mobile app wireframe design: what to do and what not, tools used in designing a mobile or web app wireframe, and more.

How long does it take to develop/build an app?

This article covers A-Z about the mobile and web app development process and answers your question on how long does it take to develop/build an app.

Best Mobile App Development Company | Android and iOS Apps

iPrism Tech is a one of the best and offshore mobile app development company in India, Saudi Arabia and USA. We are a major providers of android, iphone and ipad mobile app development services at economical prices.

Best Swift App Development Company

Apple Swift App Development India: Mobile App Development India is an expert iOS Swift App Development company in India. We develop secure and robust mobile app solutions based on new Apple Swift language.