Eric Hodel
4/7/2009 10:16:00 PM
On Apr 6, 2009, at 20:44, David Autry wrote:
> Eric Hodel wrote:
>> On Apr 6, 2009, at 20:07, David Autry wrote:
>>> build it based on the XML data and the defined class.
>> If these are Ruby objects, why don't you use Marshal?
>>
>>> I want to keep this as simple as possible unless resource
>>> management dictates I take the road less traveled. The speed at
>>> which
>>> the data is accessed is most important. I plan to load into memory
>>> the
>>> files that are currently in use by a user to speed up the process so
>>> this makes me think that XML would suffice. Hope this makes sense!
>>
>> Marshal is likely going to be significantly faster than any XML
>> serialization mechanism you write.
>
> Isn't there a drawback in terms of updating old data?
Marshal provides methods to help you handle this, if you need them.
Most of the time you won't so long as you code mildly defensively.
When you do need them, use marshal_dump/marshal_load or _dump/_load.
PS: Don't top-post, it's confusing.