Thursday 3 March 2011

CSMPortfolio loading and the corruption of already loaded CSMPositions

You know, of course, that CSMPortfolio objects are cached because they are expensive to load and compute. You also know, of course, that a user preference is 'Do not load portfolios'. Well, did you know that if you load some CSMPositions (and put them in a container for safe keeping) and then load portfolios, the CSMPositions will almost certainly be corrupted! And this is doubly surprising since, obviously, the portfolio corresponding to the position object has to be loaded already in order to build said position object.

All of which is a long-winded way of saying not to load portfolios in the middle of your app! You have been warned.

No comments:

Post a Comment