-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
2x import slowdown in latest derivation of Python for macOS with nixpkgs-unstable #118810
Comments
That's most likely since 9d03ff5. Unoptimized bytecode is no longer included because it cannot be generated reproducibly (upstream issue https://bugs.python.org/issue34722). Optimized bytecode is available so running with I am of the opinion that reproducibility is more important than performance, but of course the gap here will be huge. Related discussion for gcc #112928. This limitation for sure needs to be documented. |
You would not want to use |
Just passing by here, but it looks like @layday is running darwin, and that the optimization were not applied anyway, if I read 9d03ff5#diff-752dca48f3873cc89d448225abb8d9b16d023c01fef41d32f348a410b8ef0a31L41 correctly. Could it be something else? |
The optimizations build flag not, but I am talking here about bytecode. |
That issue is already negated by our |
I think this was fixed a long time ago. |
Describe the bug
After updating nixpkgs (
nix-channel --update
), there was a noticeable start-up slowdown when invoking several different Python CLIs. Old Python derivation on top, new one on the bottom:Running
python -v
revealed that the Python fromrakqkwxql1hsa16dphdfkdky8i9cib5v
did not have and was unable to create PYC files, meaning that it was unable to compile the standard library. For example:Whereas the older Python derivation had:
I expect that this is what's causing the slowdown. Please let me know if there's anything else I can do to help pinpoint the issue.
To Reproduce
As above.
Notify maintainers
@FRidh
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result."x86_64-darwin"
Darwin 18.7.0, macOS 10.14.6
no
no
nix-env (Nix) 2.3.10
"nixpkgs-21.05pre281282.4cb48cc2562"
/Users/abc/.nix-defexpr/channels/nixpkgs
Maintainer information:
The text was updated successfully, but these errors were encountered: