You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would significantly reduce the stack size of the builder, and would not cause any extra overhead since Object::new_internal has to do this anyway. The builders can also unsafely call new_internal to avoid checks, since we know they only use valid properties.
After that, the builders could be made generic and the property setters could be moved into extension traits, which would cut down on a lot of the duplicated generated code.
The text was updated successfully, but these errors were encountered:
The builders can also unsafely call new_internal to avoid checks, since we know they only use valid properties.
That's not actually what it does. The only thing it doesn't do is checking whether the type implements GInitable or GAsyncInitable.
This would significantly reduce the stack size of the builder
It would actually increase the stack size or not? Right now it's just allocated on the heap in a Vec. But it gets rid of a useless heap allocation in many cases.
Actually, I was thinking that we could make use of the generic ObjectBuilder for the specific builders. But that would go against your idea of omitting the property validity checks as that one always would have to do that.
This would significantly reduce the stack size of the builder, and would not cause any extra overhead since
Object::new_internal
has to do this anyway. The builders can also unsafely callnew_internal
to avoid checks, since we know they only use valid properties.After that, the builders could be made generic and the property setters could be moved into extension traits, which would cut down on a lot of the duplicated generated code.
The text was updated successfully, but these errors were encountered: