From: Brian Candler Date: 2003-03-07T20:43:44+09:00 Subject: Re: Syck YAML parser (was Re: XmlConfigFile usage) On Fri, Mar 07, 2003 at 10:09:40AM +0900, why the lucky stiff wrote: > Anyways, I'm very excited about this forthcoming YAML parser and don't want > anyone to be too discouraged by the current parse times of YAML.rb. Sometime > next week I'll post a comprehensive benchmark to the list. That sounds very interesting. I've not tried using 'okay' RPC yet but I imagine it's no harder to set up than SOAP. Parsing is not the only issue with yaml4r though; the marshalling is also slow, accounting for about 1/3rd of the total time. With my test object: - 10.times to_yaml: 3.6 secs - 10.times YAML::load: 6.7 secs But I imagine that marshalling shouldn't be too hard to write natively. (I did wonder if there was any mileage in calling Marshal.dump and then converting its output to YAML...) Regards, Brian. > > _why > > On Thursday 06 March 2003 05:23 pm, Brian Candler wrote: > > > > - using yaml4r the same ten operations take 10.6 seconds, although the > > generated data is smaller at 3,396 bytes, and much easier to read > > > > - using Ruby's built-in Marshall.dump/load is staggeringly fast, taking > > just 0.04 seconds for the same test, and generating 1,651 bytes to > > represent the same object tree. > > > > I can hardly ignore a performance factor of 250 times... unfortunately if I > > go with drb then I am tied to using Ruby for both front-end and back-end > > systems. Hence I'll lose the flexibility to get (say) a PHP programmer to > > write something which talks to it. > > > > Perhaps the solution is to forget SOAP, and to recode Ruby's native Marshal > > module for Perl, PHP, Java etc :-)) > >