Skip to content

Instantly share code, notes, and snippets.

@norman
Last active December 20, 2015 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save norman/6201167 to your computer and use it in GitHub Desktop.
Save norman/6201167 to your computer and use it in GitHub Desktop.
FriendlyId 5.0 versus 4.0
## FriendlyId 5.0
------------------------------------------------------------------------
Using ruby 2.0.0 AR 4.0.0 with sqlite3 (in-memory)
Rehearsal -------------------------------------------------------------------------
find (without FriendlyId) 0.410000 0.000000 0.410000 ( 0.412285)
find (in-table slug) 0.890000 0.000000 0.890000 ( 0.911959)
find (in-table slug; finders addon) 0.670000 0.010000 0.680000 ( 0.686639)
find (external slug) 1.660000 0.040000 1.700000 ( 1.721548)
insert (without FriendlyId) 0.960000 0.010000 0.970000 ( 0.977678)
insert (in-table-slug) 3.030000 0.010000 3.040000 ( 3.084998)
insert (in-table-slug; finders addon) 2.820000 0.010000 2.830000 ( 2.850942)
insert (external slug) 8.640000 0.060000 8.700000 ( 9.271606)
--------------------------------------------------------------- total: 19.220000sec
user system total real
find (without FriendlyId) 0.280000 0.000000 0.280000 ( 0.284815)
find (in-table slug) 0.930000 0.010000 0.940000 ( 1.015032)
find (in-table slug; finders addon) 0.490000 0.010000 0.500000 ( 0.541772)
find (external slug) 2.060000 0.060000 2.120000 ( 2.407264)
insert (without FriendlyId) 0.680000 0.000000 0.680000 ( 0.704463)
insert (in-table-slug) 3.100000 0.030000 3.130000 ( 3.411446)
insert (in-table-slug; finders addon) 2.560000 0.010000 2.570000 ( 2.593997)
insert (external slug) 9.050000 0.100000 9.150000 ( 10.153047)
## FriendlyId 4.0.9
Using ruby 2.0.0 AR 3.2.14 with sqlite3 (in-memory)
Rehearsal ---------------------------------------------------------------
find (without FriendlyId) 0.350000 0.000000 0.350000 ( 0.357558)
find (in-table slug) 0.380000 0.000000 0.380000 ( 0.381566)
find (external slug) 0.680000 0.010000 0.690000 ( 0.684494)
insert (without FriendlyId) 0.610000 0.000000 0.610000 ( 0.706949)
insert (in-table-slug) 2.030000 0.040000 2.070000 ( 2.087573)
insert (external slug) 5.750000 0.070000 5.820000 ( 5.833832)
------------------------------------------------------ total: 9.920000sec
user system total real
find (without FriendlyId) 0.250000 0.000000 0.250000 ( 0.246144)
find (in-table slug) 0.310000 0.000000 0.310000 ( 0.308583)
find (external slug) 0.610000 0.000000 0.610000 ( 0.615222)
insert (without FriendlyId) 0.580000 0.000000 0.580000 ( 0.580399)
insert (in-table-slug) 2.040000 0.050000 2.090000 ( 2.384271)
insert (external slug) 5.560000 0.060000 5.620000 ( 5.631478)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment