[Tutor] ElementTree: finding a tag with specific attribute

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Sat Sep 17 00:54:15 CEST 2005


> If you look at the list, for a while the functions are being called 777
> times. This is probably the number of start tags in the document. But
> when you get to recursiveChildGenerator(), all of a sudden it is called
> 898655 times, over 1000 times for each call to _fetch()! This is a
> staggering number of calls, it is called 8 times for every character in
> the file!

Hi Kent,

This sounds like a beautiful torture test for BeautifulSoup.

Kent, can you send me a copy of that test file too if that's ok?  I might
have some time to look into the performance problem.



More information about the Tutor mailing list