GtkD 3.5.0, GTK+ with D.

dlang user via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sat Jan 7 10:03:08 PST 2017


On 01/07/2017 11:32 AM, Gerald wrote:
> On Saturday, 7 January 2017 at 16:46:38 UTC, dlang user wrote:
>> When I compile the HelloWorld.d demo code on version 3.4.1 in debug
>> mode the resulting file size is 26.4MB, when I compile the same code
>> with 3.5.0 the file size is 70.7MB, that is quite a jump in size.  I
>> am using DMD V2.072.2 on 64bit Debian testing.
>
> As you are probably aware, GtkD auto-generates code. Unfortunately,
> adding the ability to remove event handlers generated an increase in the
> size of code, instead of just tracking the delegate directly it now uses
> a wrapper class to also track the connect flags and returned handlerId.
> Right now a unique wrapper class is generated for each event handler
> which I suspect is the primary culprit for the increase in size.
>
> If this size increase is a major concern, one option might be for me to
> try to use a generic wrapper class instead of a generating a unique one.
> This would mean converting the generated code to cast the delegate
> before using it.
>
> I'll let Mike chime in with his thoughts first though before looking too
> much into it.
>
>
>

No, the size increase isn't a concern for me at all. It was just an 
observation that I made using the new version, and I wasn't sure if it 
was expected or not.


More information about the Digitalmars-d-announce mailing list