2006/5/18, Jerrad Pierce <[EMAIL PROTECTED]>:
I've run into an odd issue with DateTime and Memoization (often necessary to get decent performance for processing 10-20k records with repeat dates). I've processed a lot of data this way but I recently ran into a few records that caused an infinite loop, below is some simplified sample code that reproduces the behavior. It goes away if I don't memoize DT::from_object, but I still find it odd and thought somebody might be interested in looking into it further (or documenting the potential for trouble?)
DateTime objects can mutate, and this can potentially place the memoization buffer in an invalid state, because the internal data is shared. One solution could be to deep clone every DT before modification, but this can be as expensive as not memoizing at all. - Flavio S. Glock