[Dev] Interationalization Schema Update

John Anderson john at osafoundation.org
Wed Jul 20 12:06:59 PDT 2005


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.

Phillip J. Eby wrote:

> At 10:28 AM 7/20/2005 -0700, Andi Vajda wrote:
>
>> Of course, the type check could happen at set time, at the cost of 
>> performance. It's a trade-off I made a long time ago and that could 
>> certainly be revisited. I could also add a 'debug' mode that enforces 
>> type upon setting.
>
>
> I suppose it would improve performance if an attribute is repeatedly 
> set to different values before a commit.  But it would be interesting 
> to know how often that occurs along a performance-critical path.  It 
> seems to me that most data-intensive tasks that actually *change* item 
> attributes are import and synchronization tasks (downloading mail, 
> sharing, etc.) which are highly unlikely to modify a given item's 
> value attributes more than once.
>
> So, it may be that if "eager" typechecking were just done for value 
> attributes, it would have no net performance impact in practice, 
> because only one check would be occurring whether it's done at 
> assignment time or commit time.
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> Open Source Applications Foundation "Dev" mailing list
> http://lists.osafoundation.org/mailman/listinfo/dev



More information about the Dev mailing list