globocom / m3u8

Python m3u8 Parser for HTTP Live Streaming (HLS) Transmissions
Other
2.03k stars 471 forks source link

Avoid using decimal.Decimal for integer values #315

Closed bbayles closed 1 year ago

bbayles commented 1 year ago

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: