Skip to navigation

1 <3 parallel.rb

Published September 13, 2007

using all 121 lines of parallel.rb from MenTaLguY’s concurrent lib…

Before:

iwotw_photos.map do |photo|
  [photo, photo.to_person_attributes]
end
$ time ./flickr_poller.sh
real    0m18.643s
user    0m2.060s
sys     0m0.190s

After:

iwotw_photos.parallel_map(10) do |photo|
  [photo, photo.to_person_attributes]
end
$ time ./flickr_poller.sh
real    0m4.733s
user    0m2.430s
sys     0m0.180s

…though I’m not sure if flickr likes 10 calls at a time to the API :\

Thoughts

toolmantim

I’m Tim Lucas, a user experience developer currently in Sydney Australia.

I occasionally write, snap photos, present on various technical topics, tweet my going-ons, share teh codes and post tidbits to the scrapbook.

Most recently I published Simplifying ticket sales on sydneyoperahouse.com (February 16, 2010)

Work with me via Agency Rainford, or shoot an email to and say hello.

Powered by social networks