[Y-devel] Holding widget data in properties
Mark Thomas mark at www.y-windows.org
Sun Feb 22 23:12:32 GMT 2004
On Sun, 22 Feb 2004, Alexey Boyko wrote:
>
> Is holding widget data in properties effective enough? Each time widget
> draws, data searched in property list. It can be slow if widgets will
> have a lot of properties, and windows have lot of widgets.
The properties are stored in a balanced binary tree, so even if you have
1000 properties, they will be found in at most 10 comparisons. I doubt
that this will be a bottleneck given all the other things that have to be
done.
> May be better, if widgets will hold data as fields in their structures, and
> each have method SetProperty, which will search where to store value?
This would increase the burden of maintaining the structures. If property
setting and retrieval proves to be a sufficient bottleneck, we can move to
this. However, I quite like the ability to set arbitrary properties
though. It makes associating data with objects for extensions a lot
easier.
Regards,
Mark.
--
|| Mark Thomas
|| efaref.net
||
|| If you pull the wings off a fly, does it become a walk?
More information about the Y-devel mailing list
2026 © www.Y-Windows.Org - All Rights Reserved