I've been reviewing some older takeouts, so had cachew off and parsing was a bit painful... so had a quick look in a profiler and did some optimization
A few optimizations
using .find instead of .select is faster since it's not using CSS selectors
using SoupStrainer is faster since it only does partial parsing and avoids materializing parts of soup we don't actually use
I've been reviewing some older takeouts, so had cachew off and parsing was a bit painful... so had a quick look in a profiler and did some optimization
A few optimizations
.find
instead of.select
is faster since it's not using CSS selectorsSoupStrainer
is faster since it only does partial parsing and avoids materializing parts of soup we don't actually useMeasurements on a big
Chrome/MyActivity.html
filebefore
outer_divs
: 17safter