Skip to content

JSON API Serializer vs Active Model Serializer Apples to Apples Benchmark Comparison

Notifications You must be signed in to change notification settings

adsteel/jas_vs_ams_comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON API Serializer - AMS 0.10.10 Comparison

An attempt to compare JSON API Serializer (formerly Fast JSON API) against Active Model Serializer, apples to apples, in a Rails context.

Results

Data visualization of benchmark speeds, in seconds, over 10 consecutive benchmark trials per serializer solution.

image

Result data

AMS test results:

  • 5.134540404003928
  • 5.561995001000469
  • 6.68827473098645
  • 6.929471960000228
  • 6.914195046003442
  • 6.87613258100464
  • 6.922666821992607
  • 6.898649249007576
  • 6.9383243629999924
  • 6.886459750996437

JSON API Serializer test results:

  • 3.4942911730031483
  • 3.5805928920017323
  • 4.078054733006866
  • 4.3636172719998285
  • 4.588106184994103
  • 4.713157361999038
  • 4.463631228005397
  • 4.352507838004385
  • 4.478046999996877
  • 4.759699816000648

Running Locally

To ensure neither code "pollutes" the performance time of the other, each benchmark is run in an isolated, tagged commit.

  1. Install gems
bundle install
  1. Set up SQLite database
bundle exec rake db:setup
  1. Run benchmark specs for JSON API Serializer
git checkout vjas
bundle exec rspec spec
  1. Run benchmark spec for Active Model Serializer
git checkout vams
bundle exec rspec spec

Contributing

Issues, improvements and expansions welcomed, just be nice, please.

About

JSON API Serializer vs Active Model Serializer Apples to Apples Benchmark Comparison

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published