Dumping models currently loads the complete model into memory. This is fatal for e.g. large models in database.
The following measures could be taken against it:
- Provide an option to dump models without doing anything fancy like compression or preg replacements at the end to fix nested strings
- save() should not retrieve a string and save that but pass an option that either is a file pointer to write to, or a method that is the "write function" and can be used to directly write to the file - or just append to a normal string