std.serialization: pre-voting review / discussion

ilya-stromberg ilya-stromberg-2009 at yandex.ru
Sun Aug 18 01:38:51 PDT 2013


On Wednesday, 14 August 2013 at 16:25:21 UTC, Andrei Alexandrescu 
wrote:
> On 8/14/13 1:48 AM, Jacob Carlborg wrote:
>> On 2013-08-14 10:19, Tyler Jameson Little wrote:
>>>   - I would to serialize to a range (file?) and deserialize 
>>> from a
>>> range (file?)
>>
>> The serialized data is returned as an array, so that is 
>> compatible with
>> the range interface, it just won't be lazy.
>
> This seems like a major limitation. (Disclaimer: I haven't read 
> the documentation yet.)
>
> Andrei

Shall we fix it before accept the std.serialization?

For example, if I have 10GB of data and 16GB operating memory, I 
can't use std.serialization. It saves all my data into string 
into operating memory, so I haven't got enough memory to save 
data in file. It's currently limited by std.xml.

In other hand, std.serialization can help in many other cases if 
I have enough memory to store copy of my data.

As I can see, we have a few options:
- accept std.serialization as is. If users can't use 
std.serialization due memory limitation, they should find another 
way.
- hold std.serialization until we will have new std.xml module 
with support of range/file input/output. Users should use Orange 
if they need std.serialization right now.
- hold std.serialization until we will have binary archive for 
serialization with support of range/file input/output. Users 
should use Orange if they need std.serialization right now.
- use another xml library, for example from Tango.

Ideas?


More information about the Digitalmars-d mailing list