Open henrikbjorn opened 12 years ago
The actual conversion of the in-memory representation to the actual format is done at the very end (for example for JSON, json_encode
is called).
We would need to write our own JSON writer if we want to support streaming. Patches welcome though :)
I have a need for serializing about 20.000 objects witch each have 7 relations that also need serialized (in total that is a lot). Currently it is not possible to batch process a serialization and that makes it keep the data in memory and the refence aswell so running out of memory will happen quite fast (at about 38000 with 500mb memory_limit).
Is it possible to implement something that makes it more memory efficient by storing the already serialized data in /tmp or have it eagerly return the serialized data (would work well with StreamedResponse).