Okay, that makes sense.  Thanks for the link to Python timing!

Can anyone familiar with the internals of django's serialization and
templating offer any suggestions?

Thanks!

On Jan 26, 2:57 am, Antoni Aloy <[email protected]> wrote:
> 2009/1/26 Taylor <[email protected]>:
>
>
>
> > I'm thinking of changing my views so that they work with XSLT and an
> > XML representation of my data.  I see 3 options:
> > 1. Use django's xml serializer.
> > 2. Use python's xml tools to make my own XML.
> > 3. Use django's template systems to drop my data into xml.  Like so:
> > <Monster name="{{ monster.name }}">
> > <hp>{{ monster.hp }}</hp>
> > ...
> > </Monster>
>
> > My question is what would be the fastest option?
> > It seems that #2 would give me the best flexibility, although #1 would
> > allow for a more general approach, although I may not need every field
> > from each object so there would be some wasted time.  Plus #2 would
> > take more work and I have a deadline! (don't we all!)
>
> > Is the xml serializer faster than plugging data through the template
> > system?  Seems like it would be, but I don't know the django
> > internals.
>
> Just prototype and test the performance for each.
>
> For one of my applications I found that lxml+mako templates was the
> best solution for me, but perhaps it's not your case.
>
> http://diveintopython.org/performance_tuning/timeit.html
>
> --
> Antoni Aloy López
> Blog:http://trespams.com
> Site:http://apsl.net
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to