Commit e53c051
committed
SL-18330: Use xml.etree.ElementTree.fromstring() when we can.
Apparently, wrapping an incoming bytes object in io.BytesIO and passing it to
xml.etree.ElementTree.parse() is slower than passing the bytes object directly
to fromstring(). Detect the BytesIO case and call fromstring() with contents.1 parent b83295a commit e53c051
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
| 268 | + | |
267 | 269 | | |
268 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
269 | 277 | | |
270 | 278 | | |
271 | 279 | | |
| |||
0 commit comments