|
From: | Kai Sterker |
Subject: | Re: [Adonthell-devel] Improved saving/loading suggestion |
Date: | Wed, 25 Feb 2004 22:22:06 +0100 |
Am Mittwoch, 25.02.04 um 15:04 Uhr schrieb Julian Rüth:
You're already using a lot of Python code, don't you? What about using python's (c)pickle module as it does exactly what you're describing (am i wrong?). Though, it's perhaps a bit slow but it does also solve the type checking issue you mentioned.
We're using a lot of Python, that's right. But using it to save and load our objects would probably add quite some overhead (if it is possible at all). I mean, pickle works on Python classes, but a lot of data we are saving are C++ objects. So we would require at least a conversion from C++ to Python (or vice versa for loading) which adds already plenty of overhead.
Also, with pickle, we don't have control over what to pickle, and how to restore it. Often, we don't want to save a field as is, just a reference to the object.
But thanks for the suggestion anyway ... Kai
[Prev in Thread] | Current Thread | [Next in Thread] |