2% performance improvement on tree construction
Bug #1899358 reported by
Morotti
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Beautiful Soup |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
(patch in the next comment)
optimize function bs4/__init__.py endData()
endData() is called 3 times per tag to process the HTML document. It does nothing two third of the calls because there is nothing more to process.
122622 calls on my perf test. 45572 calls that actually do something (going into the if section).
It is calling self.string_
It makes document construction 1% to 2.5% faster.
To post a comment you must log in.
patch attached