Java too slow: Apple has rewritten the password monitoring into Swift

Close Notice

This article is therefore available in. It was translated with technical assistance and editorialy reviewed Before Publication.

Apple has switched from Java to Swift and Vapor with its password monitoring service and now announces a performance gain of forty percent. In addition, according to Apple, the scalability, security and availability increased, but the number of code lines has reduced by 85 percent. The Swift, which was under Apache license, was invented by Apple in 2014 and has been developed since then.

The monitoring service belongs to Apple’s password manager app and checks whether passwords have been leaked, for example, appear somewhere in the Darknet (similar to how Have i been pwnd). In order to protect the security of the passwords entrusted, monitoring operates a lot of encryption, but should react quickly at the same time.

These requirements Java was no longer fair to the Apple team: “The approach to memory management at Java no longer meets our growing requirements and goals for efficiency.” Even the improved G1 Garbage Collector of the JVM did not bring the team the desired performance. Problems in particular caused long breaks of the collectors under high load and the difficulties of finet tuning for various workloads. Garbage Collectors are repeatedly criticized for bottlenecks.

The Apple team also saw defects in Java when scaling the service with changing, regionally conditional load.

The new architecture used As a web framework vaporwhich offers router, controller and content modules. The Apple team praises Swift in particular The concept of protocolsthat avoid the strict inheritance hierarchies from Java and create better modularity. The SWIFT security mechanisms also make the zero checks required at JAVA superfluous. Swift does not allow zero points. The Async AWAIT concept also facilitates the asynchronous code. The blog post also refers to the Swift ecosystem with logging, cassandra client and crypto libraries.

The fact that the contribution does not contain any criticism of the Apple language Swift is just as surprising as that the team did not consider other languages ​​without the overhead of a virtual machine such as Rust or GO.


Discover more from Apple News

Subscribe to get the latest posts sent to your email.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.