Serializers don't stream
|Reported by:||phaesler||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When you pass a stream and an iterator that returns a large number of objects to a serializer (at least JSON and XML), the serializer doesn't start writing to the file until after the iterator has been exhausted (i.e. until all data has been read into memory.) This places an unnecessarily heavy memory overhead on serialising a large data set.
See #5423 for impact on dumpdata.