Although changing the maxQueueSize
to 200,000 (greater than the test dataset) addresses the event queue being overrun, it drastically degrades the performance. The SDK takes 11 hours to digest the test dataset and another 8 hours to flush all the events to the server. What’s worse, it produces 3.2TB disk writes. The memory peak goes up to 306.7MB and CPU usage 793%.
Thus, when comes to an intensive and high volume data flow, data integrity and delivery latency are trade-offs in Analytics-iOS. In contrast, Analytics-Swift delivers all the data as expected with very low latency. In other words, the new library scales exceptionally better than the old one.
After examining the performance data from 8 different dimensions, we can conclude that the all-new Swift/Kotlin libraries outperform the old iOS/Android libraries in every aspects:
-
They are stable. The performance does not fluctuate because of thread configuration changes.
-
They are energy efficient, since less memory, CPU, and network resources are used.
-
They are reliable, owing to high IOPS and less buffered events, thus bringing a higher level of data integrity.
What’s more, the Swift library only writes necessary data to disk, which in turn saves significant battery. The Kotlin library is light-weight. During our tests, we were able to use only one single thread to boot Analytics-Kotlin.
Getting Started With Twilio Segment
Looking to get started with Twilio Segment? The Developer Toolkit gives developers the tools they need to extend the Twilio Segment platform and support the custom configurations required to streamline data collection, customize integrations as needed, and scale their data infrastructure effortlessly. Better yet – it’s available to all Twilio Segment customers.
Building your custom data infrastructure is easy – simply sign up for a free account or request a personalized demo.