Orange 1.0.0 beta - serialization library

Michel Fortin michel.fortin at michelf.com
Tue Aug 23 17:53:25 PDT 2011


On 2011-08-23 06:51:57 +0000, Jacob Carlborg <doob at me.com> said:

> On 2011-08-22 21:50, Vladimir Panteleev wrote:
>> On Sat, 20 Aug 2011 18:13:32 +0300, Jacob Carlborg <doob at me.com> wrote:
>> 
>>> I've almost finished the rewrite of my serialization library Orange.
>> 
>> While I've never had the chance to use Orange myself, one of the
>> problems I've often heard being associated with using Orange was large
>> binary file sizes. What are your thoughts about this issue? If this is a
>> real problem, do you think the toolchain could be improved in this
>> regard (perhaps ideas such as merging bitwise-identical functions at
>> link time)?
> 
> I never heard anything being associated with using Orange. The library 
> takes up 77.8 kb, compiled with dmd 1.067 on Mac OS X. A Hello World 
> app using Orange takes up 1.2 mb, I don't know if that's a problem.
> 
> I don't have any thoughts, I didn't know it was an issue. Yes I think 
> the tool chain can be improved, at least I hope it can.

If there's any truth in that (which I don't know), it'd probably have 
something to do with the amount of generated code through templates.

When I was still developing the D/Objective-C bridge as a bunch of 
templates and stub objects, the binary size was growing significantly 
for each new Objective-C class I added (due to the insane number of 
stub functions instantiated). And at some point it became totally 
impractical to use, even though it worked.

I doubt this is a problem for Orange because of its more limited scope, 
but it'd nevertheless be wise to measure how much the binary size grows 
when you add more types to serialize and unserialize and more code is 
generated as a result.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d-announce mailing list