kth.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Performance analysis of SwiftUI and UIKit: A comparison of CPU time and memory usage for common user interface elements
KTH, School of Electrical Engineering and Computer Science (EECS).
2023 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesisAlternative title
En jämförelse av CPU-tid och minnesanvänding för vanliga användargränssnittselement (Swedish)
Abstract [en]

In today's digital era, smartphones have evolved into an important part of our daily routine, thereby raising the bar for high-quality applications that deliver premium user experiences. In this landscape, UIKit and SwiftUI have emerged as two noteworthy user interface frameworks in the realm of iOS development, with UIKit having a longstanding foothold and SwiftUI displaying newer declarative coding style. The primary objective of this research was to investigate the performance of SwiftUI against UIKit, given the important role performance plays in shaping user experiences.

Our investigative journey involved comparing the frameworks' performance based on parameters such as CPU time and memory usage for common user interface components. Our insights revealed that UIKit held a performance advantage over SwiftUI, generally outperforming it by approximately 25% when the component count was less than 32 and also displaying a consistent trend of lower memory consumption. This difference in performance could be consequential in contexts related to social media applications, where even minor delays can disrupt the user experience.

SwiftUI extends advantages like reduced code length, faster development time, real-time previews, and enhanced code readability. Therefore, the decision of choosing between UIKit or SwiftUI should be driven by the particular requirements of the application in question rather than solely focusing on its performance. The study does carry certain limitations, including the absence of exact equivalent components between UIKit and SwiftUI in some scenarios, and a limited set of benchmarked iPhone models.

Abstract [sv]

I dagens digitala era har smartphones utvecklats till en viktig del av vår dagliga rutin, och höjer därigenom ribban för högkvalitativa applikationer som levererar förstklassiga användarupplevelser. I detta landskap har UIKit och SwiftUI dykt upp som två anmärkningsvärda UI-ramverk inom iOS-utvecklingens område, med UIKit som har ett långvarigt fotfäste och SwiftUI visar nyare deklarativ kodningsstil. Det primära syftet med denna forskning var att undersöka prestandan hos SwiftUI mot UIKit, med tanke på den viktiga roll prestanda spelar för att forma användarupplevelser.

Vår undersökningsresa innebar att jämföra ramverkens prestanda baserat på parametrar som CPU-tid och minnesanvändning för vanliga UI-komponenter. Våra insikter avslöjade att UIKit hade en prestandafördel gentemot SwiftUI, i allmänhet överträffade den med cirka 25% när komponentantalet var mindre än 32 och visade också en konsekvent trend med lägre minnesförbrukning. Denna skillnad i prestanda kan vara följdriktig i sammanhang relaterade till sociala medieapplikationer, där även mindre förseningar kan störa användarupplevelsen. 

SwiftUI utökar fördelar som minskad kodlängd, snabbare utvecklingstid, förhandsvisningar i realtid och förbättrad kodläsbarhet. Därför bör beslutet att välja mellan UIKit eller SwiftUI styras av de särskilda kraven för applikationen i fråga snarare än att enbart fokusera på dess prestanda. Studien har vissa begränsningar, inklusive frånvaron av exakt likvärdiga komponenter mellan UIKit och SwiftUI i vissa scenarier, och en begränsad uppsättning benchmarkerade iPhone-modeller.

Place, publisher, year, edition, pages
Stockholm: KTH Royal Institute of Technology , 2023. , p. 84
Series
TRITA-EECS-EX ; 2023:427
Keywords [en]
SwiftUI, UIKit, Performance analysis
Keywords [sv]
SwiftUI, UIKit, Prestationsanalys
National Category
Computer Sciences Computer Engineering Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-334282OAI: oai:DiVA.org:kth-334282DiVA, id: diva2:1789094
External cooperation
Bontouch AB
Supervisors
Examiners
Available from: 2023-08-19 Created: 2023-08-17 Last updated: 2023-08-19Bibliographically approved

Open Access in DiVA

fulltext(12703 kB)9412 downloads
File information
File name FULLTEXT01.pdfFile size 12703 kBChecksum SHA-512
e3871b5886a57f34192c6dedffad80e2ed3ebaa52306312d954d1713f408df0f4c3e2a821e4e254332dbcf92b06993a9cac707abe7792bf0e326780e4dd06e6c
Type fulltextMimetype application/pdf

By organisation
School of Electrical Engineering and Computer Science (EECS)
Computer SciencesComputer EngineeringComputer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 9416 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 1769 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf