[Dev] Small tweak to parcel loader
John Anderson
john at osafoundation.org
Fri Jun 11 12:43:12 PDT 2004
Andi Vajda wrote:
>>A question I have for Andi is: "what is more efficient (in terms of
>>time): looking up the value of an attribute that has been given an
>>initialValue, or a defaultValue?" Potentially, retrieving a
>>defaultValue means there's an extra place to go look for a value (but I
>>haven't checked the code yet to see how this works).
>>
>>
>
>The trade-off is space vs speed. The defaultValue is owned by the attribute
>item, not the item. The initialValue is copied onto the item during item
>construction. The defaultValue is schema-owned, the initialValue is copied and
>that copy is item-owned.
>Looking up a defaultValue is more costly since it has to be fetched from
>schema everytime.
>Another difference is that a defaultValue that can be modified in place, such
>as a collection, lob or struct, is marked read-only since modifying a
>defaultValue affects all items that share it.
>
>
It seems to me like the typical case is where I would want to set a
default value for an attribute but whenever I assign to the attribute on
an item with the default value, only the attribute of that item gets a
read write copy of the attribute with the new value. If this isn't the
default behaviour it seems like a bug to me.
>Andi..
>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
>Open Source Applications Foundation "Dev" mailing list
>http://lists.osafoundation.org/mailman/listinfo/dev
>
>
More information about the Dev
mailing list