Skip to content

Soap4R ng vs Handsoap Benchmarks

Laurence A. Lee edited this page Jun 27, 2015 · 4 revisions

Benchmarks as of 2015-June-27

Just for giggles

OK, so I was curious to see how Soap4R-ng stacks up. I pulled down the Benchmarks that Handsoap uses, and wow, the numbers are surprisingly close. Looks like a great performance boost can be expected from Curb, and I hope to get that in place soon.

What's surprised me a bit is the performance difference between Nokogiri and Ox parsers -- I expected Ox to fare much better than these numbers show, and I'll be going over that parser code to see if there's anything I can do to speed that up.

No disrespect to the authors of Handsoap, BTW. Whereas I'd suggest Handsoap or Savon for "new" projects, I am maintaining Soap4R-ng primarily to provide an upgrade path to extend the life of already-built (legacy) systems -- particularly those that are being forced to move away from older Ruby implementations.

Using HTTPClient and OX Parser

[lalee@ufo soap4r]$ SOAP4R_PARSERS=oxparser bundle exec ruby benchmark*rb 1000
Benchmarking 1000 calls ...
                                       user     system      total        real
soap4r                             1.790000   0.130000   1.920000 (  2.668672)
handsoap+curb+nokogiri             0.860000   0.130000   0.990000 (  3.501106)
handsoap+curb+libxml               0.810000   0.130000   0.940000 (  3.402734)
handsoap+curb+rexml                1.630000   0.310000   1.940000 (  4.110071)
handsoap+httpclient+nokogiri       1.320000   0.290000   1.610000 (  3.720977)
handsoap+httpclient+libxml         1.200000   0.310000   1.510000 (  3.939503)
handsoap+httpclient+rexml          2.020000   0.470000   2.490000 (  3.741095)
---------------
Legend:
The user CPU time, system CPU time, the sum of the user and system CPU times,
and the elapsed real time. The unit of time is seconds.

Using HTTPClient and Nokogiri Parser

[lalee@ufo soap4r]$ SOAP4R_PARSERS=nokogiriparser bundle exec ruby benchmark*rb 1000
Benchmarking 1000 calls ...
                                       user     system      total        real
soap4r                             1.360000   0.110000   1.470000 (  2.035756)
handsoap+curb+nokogiri             0.810000   0.160000   0.970000 (  3.171513)
handsoap+curb+libxml               0.840000   0.150000   0.990000 (  4.003329)
handsoap+curb+rexml                1.660000   0.230000   1.890000 (  4.125249)
handsoap+httpclient+nokogiri       1.300000   0.330000   1.630000 (  3.900529)
handsoap+httpclient+libxml         1.130000   0.310000   1.440000 (  3.587362)
handsoap+httpclient+rexml          2.090000   0.450000   2.540000 (  4.053976)
---------------
Legend:
The user CPU time, system CPU time, the sum of the user and system CPU times,
and the elapsed real time. The unit of time is seconds.
[lalee@ufo soap4r]$