From jeroen.ooms at stat.ucla.edu  Tue Jan 10 22:12:13 2012
From: jeroen.ooms at stat.ucla.edu (Jeroen Ooms)
Date: Tue, 10 Jan 2012 13:12:13 -0800
Subject: [Rd] serializing recordedplot object
In-Reply-To: <7CE3B991-C200-45D5-836F-96E6DE807BCF@r-project.org>
References: <CABFfbXvzRJZ-72v6EqyvZyUi4NtNVn-BforTc-2+hP6GxU_Pag@mail.gmail.com>
	<CABFfbXu9mycTn0Ctt1Rsre7JwF5+cxjkeJeLrTOOF9Cov_H9sw@mail.gmail.com>
	<7CE3B991-C200-45D5-836F-96E6DE807BCF@r-project.org>
Message-ID: <CABFfbXs3P2nFpyA-_39EDnjPP-_TP8wxO-Va4PHXXOsABeuS9Q@mail.gmail.com>

On Tue, Jan 10, 2012 at 6:17 AM, Simon Urbanek
<simon.urbanek at r-project.org> wrote:
> Unfortunately R doesn't provide a way for this. Without changes to unserialization (on the wishlist for a few years now, but not easy to design) the best you can do is to check the native symbols for NULL pointers on usage and then re-fetch - that's something that could be done reasonably easily, although it's still a hack ...

Hmm that concerns me a bit. I make heavy use of saveRDS and readRDS in
my framework and have assumed that for all practical purposes most
objects can be saved to disk and loaded later on without problems. Are
there any other types of objects that are not being
serialized-unserialized to a state where they are functional again?

In the case of the NativeSymbolInfo object, it should not be too hard
to add an optional feature to unserialize which reloads the package
and NativeSymbolInfo when it runs into nullpointers during
unserialization? I am currently doing this manually after the
unserialization, but that introduces quite some overhead.

Thanks,

Jeroen



[Rd] serializing recordedplot object
Jeroen Ooms