Skip to content

Instantly share code, notes, and snippets.

@danielpclark
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save danielpclark/e5f2bb61a4087448ac3a to your computer and use it in GitHub Desktop.

Select an option

Save danielpclark/e5f2bb61a4087448ac3a to your computer and use it in GitHub Desktop.
Benchmark Ruby Mechanize vs Nokogiri CSS selector on specific link.

100 Requests with full initialization on each.

Ruby 2.1.2

                          user     system      total        real
mechanize:            3.400000   0.060000   3.460000 ( 55.907562)
nokogiri:             2.780000   0.180000   2.960000 ( 77.010076)
mechanize thread:     3.370000   0.190000   3.560000 (135.945538)
nokogiri thread:      2.790000   0.170000   2.960000 (141.881537)

Mechanize class initialized just once with 100 requests.

                          user     system      total        real
mechanize:            3.480000   0.100000   3.580000 ( 65.495341)

No time saved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment