Switch to Marshal.dump/load instead of using slow yaml serialization