How big is the XML? Since you've already verified that the generation isn't the problem, this could be a browser issue. Most browsers attempt to parse and style the XML (to show it in a nice document tree), which could take a while for really huge files. When choosing to output with the HTML mimetype, the browser doesn't need to do any extra work.
On Mar 29, 8:21 am, serjant <serjan...@gmail.com> wrote: > Hi all. > > Can somebody help me and point me to solving the following problem: > > 1. I am writing an application where I render the needed information > in the XML file (to be more specific GeoRSS) > 2. I am generating the GeoRSS with the means of the GeoAtom1RSS django > class, and passing it to HttpResponse in this way: > > response = HttpResponse(mimetype='application/atom+xml') > geoFeed.write(response, encoding) #geoFeed is the generated GeoRSS > return response > > So the problem is time rendering of this XML file in browser. When I > want to see the generated RSS or XML in borwser, then the rendering is > too slow, takes at least 25-40 seconds. > I wrote a TestCase, where i found that the generator is not to blame > at all, cuz selecting data from the database and generating GeoRSS > with it takes 2-3 seconds maximum (avg: 1.5 seconds) in case the data > is so huge. > By switching the mimetype to text/html, the performance was really > good and stopped at 3 seconds of the rendering. > > Is there any way to increase the speed of the GeoRSS or XML rendering > with HttpResponse? > Is that a known issue? > > Thanks in advance > David -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.