Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
libs
src/main
.gitignore
README.md
build.gradle
proguard-rules.txt

README.md

Benchmark-demo

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:

The code in this demonstration is mostly copied from LoganSquare's benchmark demo app — so shout-out to bluelinelabs for the code!

Installation

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.