[Tutor] ElementTree: finding a tag with specific attribute

Bernard Lebel 3dbernard at gmail.com
Sat Sep 17 04:13:54 CEST 2005

Kent, sorry to send you back your request, I won't access to file
until Monday, so either you send it to Danny, either Dannay waits
until Monday. I'm fine with you sending the file to Danny.

Guys let me know if Danny receives the file, I'll send it Monday if not.
And thanks for looking into this, glad to contribute to development :-)


On 9/16/05, Kent Johnson <kent37 at tds.net> wrote:
> Danny Yoo wrote:
> >>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.
> Bernard, would you send a copy to Danny? It's not my data so I'd rather not forward it.
> Danny, the file is not particularly large or difficult, it has a simple structure and nests about six levels deep. Maybe there's some O(n^2) nastiness somewhere in BeautifulSoup.
> Kent
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor

More information about the Tutor mailing list