[eluser]OverZealous[/eluser]
Well, there is nothing technically wrong with that code. It's just that DataMapper isn't optimized for displaying a lot of individual objects like that - it's more optimized for manipulating objects.
The reason it uses so much RAM is that each MyClass requires a complete object, with a lot of properties and overhead. It isn't noticeable for a few hundred objects, but 2000 is a lot.
Anyway, did you try the code I mentioned above? It should reduce your peak RAM usage. Otherwise, for such a special case, I would be tempted to just run a normal query (for this instance). You aren't really doing anything in your example code that makes using DM seem worth the overhead.