GtkD 3.5.0, GTK+ with D.

Gerald via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sat Jan 7 09:32:21 PST 2017


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.





More information about the Digitalmars-d-announce mailing list