[Gtk-sharp-list] PATCH: speed up treeview and managed values
Ben Maurer
bmaurer@users.sourceforge.net
Sun, 15 Feb 2004 11:08:11 -0500
On Sun, 2004-02-15 at 02:53, John Luke wrote:
> A few comments after glancing over the patch:
> - The rest of Gtk# and GTK+ is LGPL licensed why did you submit these
> with GPL headers.
Hrm, i had just copied the license from `nodestore.c' and assumed that
was using the correct license. If it is approved I will change it.
> - I'm not crazy about special casing certain things to C code solely for
> performance unless it is very necessary. Hopefully you looked into the
> future maintainability, considered the NodeStore implementation, and GTK
> 2.4 changes.
If you think im crazy about writing code in C you are damn wrong :-).
The easiest one to convert would be the TreeStore one. If GLib.Value
were a struct, so we could allocate it on the stack, this could be done
in c#. However, this would require major changes to the generator
(though it would give us some global perf boosts). Also, we would not be
able to have the destructor, which means people would have to be careful
to use the using () pattern.
The second one i dont think is worthwhile to do in C#. We could write a
custom hashtable that would avoid the boxing, but this would require
much, much more code. The only thing i dislike more than C code is ten
times as much C# code :-).
-- Ben