Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update of urllib3 makes kodi start up much slower #3

Closed
peno64 opened this issue Apr 29, 2019 · 2 comments
Closed

update of urllib3 makes kodi start up much slower #3

peno64 opened this issue Apr 29, 2019 · 2 comments

Comments

@peno64
Copy link

peno64 commented Apr 29, 2019

Is it normal that the update to version 1.25 makes kodi start up much slower? With version 1.22 it takes about 20 seconds to start up my rpi with kodi and all the add-ons. After the latest update of a couple of says ago to 1.25.1 and also with 1.25.2 which I installed from zip it takes about 45 seconds to start up with all the add-ons.
Is this to be expected and if so will the slow down only in the startup or can it also be in the use of kodi and addons?

Thank you

@peno64
Copy link
Author

peno64 commented Apr 29, 2019

In fact 1.24.1 is also still fast (about 25 seconds to startup everything) and from 1.25.1 on it is much slower (about 45 seconds to startup everything)

@Freso
Copy link
Owner

Freso commented Apr 29, 2019

Is urllib3 the only difference? Does it still persist after a couple of restarts? Can you replicate it with a Kodi that has no add‐ons other than this?

Could potentially be related to the new support for brotli, it could be related to the inclusion of the rfc3986 package, it could be related to new certificate checks related to the fix of CVE-2019-11324. Or probably a number of other things.

Either way, there’s not much I can do about it. If you can identify the bottleneck, consider reporting it upstream. In fact, looking now, it seems like you already did: urllib3/urllib3#1590

Closing this.

@Freso Freso closed this as completed Apr 29, 2019
Freso added a commit that referenced this issue May 5, 2019
Due to urllib3 v1.25.x’s inclusion of `rfc3986` it’s compiling a bunch
of regexes every time `urllib3` is imported… which it is every time
`requests` is imported, which is imported by a ton of Kodi add‐ons.

The best solution here would be either for `urllib3` (or `rfc3986`) to
be smarter about the regex compiling, or for Kodi to not need to
reimport Python libraries on every view change… However, neither of
those are here‐and‐now fixes and upstream `urllib3` have released a
version of 1.24.x which includes the security fix that was previously
only available in the 1.25.x releases, so downgrading to 1.24.3 until
this is handled better either by urllib3, its consumers, or Kodi itself.

Fixes #3
and Freso/script.module.requests#25

See also issue reported to upstream:
urllib3/urllib3#1590

And issue reported to upstream `requests`:
https://github.com/kennethreitz/requests/issues/5080

Based on urllib3-1.24.3.tar.gz from PyPI:
https://pypi.org/project/urllib3/1.24.3/#files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants