« Gotcha with cache_fu and permalinks | Main | Marshal data too short error with ActiveRecord »

August 27, 2008

Comments

Bryan Helmkamp

Nice post, Paul.

One issue I ran into with Marshaling data into the database this week was related to character encoding. I never totally nailed down the specific problem, but I had to base64 encode the Marshal output in order to safely store it in a TEXT column.

-Bryan

Dr Nic

I heard that the yaml lib may be removed from ruby1.9 as it has no maintainer. Perhaps a new maintainer could start as a rewriter, and code the lib in C?

Paul Dix

I think the current YAML parser is Syck, which is a Ragel parser written in C. If that's the case I'm not sure how its speed could be improved.

Lukas Rieder

What about XML serialization? I don't think it might be faster than marshal but I'd like to see it in the results.

Have a nice day and thank you for this great post,

Lukas

Giles Bowkett

why the lucky stiff wrote Syck and it's been a part of Ruby since 1.8.0.

however, it could definitely be faster! Syck might not be the bottleneck - the Syck page says Syck is hella fast - but I've seen Ruby YAML go slow as hell on my password gem. first thing I did when I read this post was make a note to switch password from YAML to Marshal.

maybe you have to explicitly invoke Syck to get faster YAML. I don't know. very weird that why brags about its speed yet users complain about its not-speed.

The comments to this entry are closed.

My Photo

Talks

Linkage

Twitter / pauldix