[google-appengine] Re: Advice on dealing with high CPU consumption in fetch + parse script

2009-04-23 Thread cast42
You could try: import xml.etree.cElementTree as etree result = urlfetch.fetch(url) if result.status_code == 200: ## parse XML return dom = etree.fromstring(result.content) ## build list of returned products by traversing parsed XML items =

[google-appengine] Re: Advice on dealing with high CPU consumption in fetch + parse script

2009-02-25 Thread Sérgio Nunes
Thanks for the feedback. The Atom file is typically small ~100KB. I am using both minidom (for extracting entities) and BeautifulSoup (to extract properties from entries). Which XML parser do you recommend? I'm a just starting with Python. What is the fastest setup to fetch and parse Atom feeds

[google-appengine] Re: Advice on dealing with high CPU consumption in fetch + parse script

2009-02-25 Thread Scott Seely
Are you doing anything other than parsing the XML? Also, how big is the Atom feed? > 10MB? Also, are you using a DOM parser or stream based? Stream based will be a bit faster. Finally, how long does it take you to parse, say, 100 Atom entries using your code? I would expect the time to be on th