At 11:40 PM -0800 4/11/99, Christopher Hunt wrote:
>Can anybody tell me if DmResizeRecord always resizes i.e. if I pass it
>in a record size of n whereby the record is already of size n, is there
>a performance price to pay other than for the comparison?
In the current implementation, there is a moderate performance hit in this
case, but it's much less than it would be if the record had to grow or
shrink. In general, shrinking a record is cheaper than growing it, since
it can always shrink "in place", while often it must move to grow.
Of course, MemHandleSize is relatively cheap, and a MemHandleSize and a
comparison will be a lot faster than a DmResizeRecord that doesn't change
the size, so if this is a common case and it's at a time sensitive point in
your application, it's probably worth the extra code.
As Jim indicated, the performance hit comes because the check the see if
the record needs to grow or shrink doesn't happen until several layers into
the data manager and memory manager.
--Bob