From: Peter Zotov Date: 2012-09-20T13:12:24+09:00 Subject: Re: wow, YAML / Psych in 1.9.3 is *slow*! Patrick B. писал 19.09.2012 19:14: > Matt Neuburg wrote in post #1076014: >> I just started trying Ruby 1.9.3, coming from Ruby 1.8.7, and was >> surprised to discover YAML's sluggishness. The chief problem seems >> to be >> the Psych library. >> > [...] >> Fortunately, I can switch to the "syck" library: >> >> begin >> YAML::ENGINE.yamler = 'syck' >> rescue >> >> Using syck, the same routine takes about 7 seconds. > > Wow indeed! With a test app with some of my data (having to load 820 > yaml documents) switching to syck took execution from 16.7 to 1.3 > seconds! > Are there any known side-effects with doing this? Yes; namely, not being compatible with YAML specification. Psych was written for a reason, and that reason was Syck's brokenness. For years it has generated invalid YAML (or was refusing to consume valid YAML; I have seen different opinions on this) in common cases. For example, this: http://blog.rubygems.org/2011/08/31/shaving-the-yaml-yak.html > > Patrick -- WBR, Peter Zotov.