I did some profiling of this module with cProfile and found that the most expensive part of the dumps function is the number_to_string, which uses the decimal module.
This PR changes removes few calls to number_to_string where it's possible:
EXT-X-DISCONTINUITY-SEQUENCE is necessarily an integer, per RFC 8216
I did some profiling of this module with
cProfile
and found that the most expensive part of thedumps
function is thenumber_to_string
, which uses thedecimal
module.This PR changes removes few calls to
number_to_string
where it's possible:EXT-X-DISCONTINUITY-SEQUENCE
is necessarily an integer, per RFC 8216LAST-MSN
SKIPPED-SEGMENTS