webkom / lego

Backend for abakus.no
https://lego.abakus.no
MIT License
55 stars 20 forks source link

Replace `urlparse()` with the faster `urlsplit()` alternative #3286

Closed ivarnakken closed 1 year ago

ivarnakken commented 1 year ago

urlparse() allows for “parameters” before the ? in the URL, which we do not use here.

urlsplit() supports a later (1998) RFC and does not parse such parameters. It's thus a bit faster.

Anthony Sottile did a video on the subject, which taught me about this difference.


This change makes a very little difference for us, but I just wanted to try it out for fun.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (f19caaf) 88.32% compared to head (e5865ab) 88.32%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3286 +/- ## ======================================= Coverage 88.32% 88.32% ======================================= Files 661 661 Lines 20882 20882 ======================================= Hits 18444 18444 Misses 2438 2438 ``` | [Impacted Files](https://codecov.io/gh/webkom/lego/pull/3286?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=webkom) | Coverage Δ | | |---|---|---| | [lego/apps/ical/utils.py](https://codecov.io/gh/webkom/lego/pull/3286?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=webkom#diff-bGVnby9hcHBzL2ljYWwvdXRpbHMucHk=) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=webkom). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=webkom)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.