On Apr 27, 12:11 pm, Piotr Grabowski <grabowski...@gmail.com> wrote:
> I didn't think about performance a lot. There will be regressions.
> Now serialization is very simple: Iterate over fields, transform it into
> string (or somethink serializable), serialize it with json|yaml|xml.
> In my approach it is: transform (Model) object to Serializer object,
> each field from original object is  FieldSerializer object, next  (maybe
> recursively) get native python type object from each field, serialize it
> with json|yaml|xml.
> I can do some optimalizations in this process but it's clear it will
> take longer to serialize (and deserialize) object then now. It can be
> problem with time taken by tests if there is a lot of fixtures.
> I will try to write good, fast code but I will be very glad if someone
> give me tips about performance bottlenecks in it.

One possibility is to have a fast-path for simple cases. But,
premature optimization is the root of all evil, so lets first see how
fast the code is, and then check if anything needs to be done.

I still think it is a good idea to actually check how fast the new
serialization code is, not just assume it is fast enough. So, please
include some simple benchmarks in your project.

I hope users who have a need for fast serialization will participate
in this discussion by telling their use cases.

 - Anssi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to