This is a benchmark app that demonstrates that PaperParcel is the fastest parcelling library available. Although performance isn't the primary value proposition for PaperParcel, it's nice to show that the generated code is really fast.
This demo also uses separate packages for the model classes for each processor so that the total number of generated method references can be easily compared. The results are as follows:
- AutoValue: Parcel Extension (2161 + 0 library method references2)
- Parceler (104 methods + 607 library method references2)
- PaperParcel (94 methods + 194 library method references2)
Warning: using Instant Run can give unexpected results. Install using the following command:
./gradlew clean :benchmark-demo:installDebug
1 These methods are including automatically generated gson adapters, the total count goes down to 172 without them. Note that AutoValue produces a lot of these method references but the point is to demonstate that with even just a few model classes, AutoValue extensions can quickly increase your method reference count. Full disclosure, AutoValue: Parcel Extension is actually almost as lightweight as it possibly can be, in fact, PaperParcel's AutoValue extension generates slightly more method references to support a richer type system.
2 Library method references are the standard methods that are compiled into the APK when using the library.