Skip to content

Instantly share code, notes, and snippets.

@tgautier
Created October 29, 2012 18:41
Show Gist options
  • Save tgautier/3975612 to your computer and use it in GitHub Desktop.
Save tgautier/3975612 to your computer and use it in GitHub Desktop.
require 'benchmark'
Benchmark.measure { Callbacks::ShoesProduct::Update.perform 29 }
# sibling_color_slug = {}
# variants_stock_availability = {}
# no specific update_siblings_of() for ShoesProduct
# sibling_ids: product.available_siblings.map(&:id),
# available: product.available?,
# displayable: product.displayable?,
# out_of_stock: product.out_of_stock?,
=> 3.590000 0.450000 4.040000 ( 4.372510)
# sibling_ids: product.available_siblings.map(&:id),
# available: product.available?,
# displayable: product.displayable?,
# out_of_stock: product.out_of_stock?,
=> 4.890000 0.470000 5.360000 ( 6.039610)
sibling_ids: product.available_siblings.map(&:id),
displayable: product.displayable?,
out_of_stock: product.out_of_stock?,
visible: product.visible_front
=> 5.210000 0.480000 5.690000 ( 6.470996)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment