At 12:06 PM 7/20/2005 -0700, John Anderson wrote:
Wwe could easily measure what the cost of testing attribute types at runtime is and if it's not too bad doing it in the debug build seems like a good idea.

Since the type checking is done at commit anyway, it presumably takes the same amount of time as doing it earlier, as long as you're only changing the attribute once between commits on performance-critical execution paths.

In other words, if you change an attribute only once between commits, there should be no difference in performance at all.

If you frequently change the same attribute on the same item, then of course the check will be repeated. However, I would guess that the most common cases of a (value) attribute changing more than once are not on critical paths, in which case there's no reason to restrict the checking to a debug build.

So, the thing we would want to find out is, do we change the same value attribute of the same item a lot? And when we do, is it on something that makes a user-observable difference? (For example, we obviously change an attribute more than once if a user edits it, but a single extra type check per edit isn't going to be a problem there because the total additional time will be measured in microseconds.)

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev

Reply via email to