Giter Club home page Giter Club logo

Comments (6)

daveisfera avatar daveisfera commented on September 28, 2024 1

According to the benchmarks on ciso8601, it's a significant improvement over iso8601 (almost 100x), but compared to the built-in function it's a lot closer, so the need to change that should go down a lot with this change and would still be completely possible

from m3u8.

daveisfera avatar daveisfera commented on September 28, 2024 1

Looks like this isn't a viable solution until Python 3.11 so I'm guessing this needs to wait

from m3u8.

bbayles avatar bbayles commented on September 28, 2024

One thing to consider: if you do performance profiling, you'll find that date parsing is one of the slowest things this library does. The ciso8601 package is a C extension that speeds up this process greatly.

Right now it's easy to patch in ciso8601 for iso8601 (m3u8.parser.cast_date_time = ciso8601.parse_datetime).

I support dropping the iso8601 dependency, but it would be good to maintain the ability to patch in ciso8601.

from m3u8.

daveisfera avatar daveisfera commented on September 28, 2024

On a semi-related note, I added a PR for adding 3.12 to the list of tested versions and I noticed that ciso8601 doesn't have wheel packages for that yet, so it would need to be built from source until those are added

from m3u8.

movermeyer avatar movermeyer commented on September 28, 2024

FWIW, there is also the option of using backports.datetime_fromisoformat, which brings Python 3.11's parsing code to older versions of Python 3 (with pre-built wheels and high-performance).

from m3u8.

daveisfera avatar daveisfera commented on September 28, 2024

I did another version of my PR that uses the built-in on 3.11 and later, but I really liked the idea of using the backports (for the consistent implementation and performance improvement), so I added that to the PR as well. Thanks for the suggestion!

from m3u8.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.