mono / gtk-sharp

Gtk# is a Mono/.NET binding to the cross platform Gtk+ GUI toolkit and the foundation of most GUI apps built with Mono
http://www.mono-project.com/GtkSharp
Other
426 stars 141 forks source link

[GLib, Gen] Add IgnoreRegistrationAttribute #197

Closed Therzok closed 7 years ago

Therzok commented 7 years ago

This attribute allows for a fast path of registration of a gtype. We selectively choose what to register if we mark the type with the attribute. Thus, if you mark something with IgnoreRegistration(DefaultHandlers=false), it'll only register DefaultHandlers for a method, so we don't reflect all the methods of each type when we register the gtype.

Therzok commented 7 years ago

Give or take, this should decrease startup time by 500ms if we apply it in MonoDevelop, but it can lead to hard to track bugs. I'm still not sure what to do about this PR. We reflect a lot just to register a gtype.

Most managed implementations in MD do not have any kind of Property/Signal/Interface usage. So we can trim down assemblies so native registration is skipped for the types that contain them.

The problem is do we want that?

Therzok commented 7 years ago

Not worth it.