Remove the 'high cardinality dimension' feature in mondrian 4.0. (The highCardinality attribute of the Dimension element.)
The implementation – making iterators look like lists – has a number of architectural problems: it duplicates code; because it allows backtracking for a fixed amount, it works with small dimensions but unpredictably fails with larger ones; and because lists are based on iterators, re-starting an iteration multiple times (e.g. from within a crossjoin) can re-execute complex SQL statements.
There are other architectural features designed to help with large dimensions. Many functions can operate in an 'iterable' mode (except that here the iterators are explicit). And we can push down SQL.
Over the years we have seen numerous inconsistencies, and if we removed this feature in mondrian 4.0, we could better focus our resources.
If anyone is using the feature and getting significant performance benefit, I would like to hear about your use case, and we will try to provide an alternative solution in mondrian 4.0.