Skip to content

import redis slow on FreeBSD / Python3.6 / related to uuid #1193

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

Closed
Brampie66 opened this issue Jul 17, 2019 · 3 comments
Closed

import redis slow on FreeBSD / Python3.6 / related to uuid #1193

Brampie66 opened this issue Jul 17, 2019 · 3 comments
Labels

Comments

@Brampie66
Copy link

Thanks for wanting to report an issue you've found in redis-py. Please delete this text and fill in the template below.
It is of course not always possible to reduce your code to a small test case, but it's highly appreciated to have as much data as possible. Thank you!

Version: 3.2.1, 2.10 ?

Platform: Freebsd, python 3.6.7

Description: import redis takes 6 seconds on python3.6, this is because import uuid takes this long.
With the uuid.py file from python3.7 importing goes faster but generating the first uuid1() takes long, uuid4() goes a lot faster.
I found this example, https://redislabs.com/ebook/part-2-core-concepts/chapter-6-application-components-in-redis/6-2-distributed-locking/6-2-3-building-a-lock-in-redis/
this uses uuid4(), is it of any importance that it is uuid1 ?

@adamantike
Copy link

Related CPython pull request, which wasn't back-ported to 3.6: python/cpython#3796

@andymccurdy
Copy link
Contributor

This seems like a bug in the FreeBSD Python 3.6 implementation so there's not a lot we can do here.

There's no reason that uuid1 must be used -- any unique token will work. We could easily add a hook to make it easy to swap out the usage of uuid1 for something else.

@github-actions
Copy link
Contributor

This issue is marked stale. It will be closed in 30 days if it is not updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants