From: Shin guey Wong Date: 2008-05-03T14:57:54+09:00 Subject: Ruby Hash/Array to_yaml is slow I try to convert a ruby array(contains hash and array) to yaml and it takes 60 seconds to perform the job and it consumes a lot of memory and full cpu usage(almost 100%). The ruby object is very big and it will produce 80000+ lines of yaml file. The speed is not acceptable for me. So, instead of using the to_yaml function I created my own conversion function just do print string for the hash and the array and now it only take 2 seconds.(I did some changes like use inner hash to reduce the yaml lines count, now it only produce 40000 lines) I am not sure the alogrithm of the yaml but could it be a bug for the ruby yaml? -- Posted via http://www.ruby-forum.com/.