Open baryluk opened 5 years ago
My site generation jumps from 18 seconds to 30-40 seconds.
I didn't do profiling, but this is probably due to HTML parser and tag stripping. It isn't great at all.
Few other minor comments about the code:
if x is not None: xyz abc
can be simplified to:
if not x: return xyz abc
no need for None, or is, and it deindents code.
Also:
if minuts == 0: minutes = 1
simply fold it into minutes expression, as min(1, ...), or as minutes = int(ceil(0.1 + words/WPM)).
min(1, ...)
minutes = int(ceil(0.1 + words/WPM))
Also, lack of unit tests is worrying.
Do you plan on submitting a PR about this ?
My site generation jumps from 18 seconds to 30-40 seconds.
I didn't do profiling, but this is probably due to HTML parser and tag stripping. It isn't great at all.
Few other minor comments about the code:
can be simplified to:
no need for None, or is, and it deindents code.
Also:
simply fold it into minutes expression, as
min(1, ...)
, or asminutes = int(ceil(0.1 + words/WPM))
.Also, lack of unit tests is worrying.