Caching by Marshal


Radiant uses YAML for caching pages, but I think Marshal is better. I
recommend Marshal because YAML has a problem of handling multi-byte
characters and YAML is slower than Marshal. I attached the patch for
using Marshal, this works fine in my environment.

  1. multi-byte characters problem

I experienced a problem that pages including japanese characters were
broken. This is the same as “[Radiant] Cache problems” by bodhi.
(see[email protected]/msg00660.html)

When I try Marshal for caching, pages including japanese characters are
I think YAML has a problem of handling multi-byte characters.

  1. YAML is slower than Marshal

I compared YAML and Marshal performance by runing “test.rb”(attached
this mail), the result is


I think caching by YAML has no advantage(excuding debug?). Maybe it
would be better to replace YAML by Marshal or use Marshal in
production environment.

Keita Yamguchi

This is excellent. Can you update the unit tests to reflect this change?
Bodhi, would you have time to verify the performance statistics and make
sure this makes it into the core?

John L.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs