-
Notifications
You must be signed in to change notification settings - Fork 64
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
Faster startup #79
Faster startup #79
Conversation
Codecov Report
@@ Coverage Diff @@
## master #79 +/- ##
==========================================
- Coverage 17.15% 6.07% -11.09%
==========================================
Files 71 71
Lines 4285 4299 +14
==========================================
- Hits 735 261 -474
- Misses 3550 4038 +488
Continue to review full report at Codecov.
|
You could rather do This takes 1.37 sec. or 31% off the time you have:
which is already a big improvement over your previous numbers. I like what you've done with the package, and downloading Julia or Python depending on where calling from. I see this could be my go-to package. Could should it rather download Python 3.10 (or 3.9 if 3.10 problematic) now by default. I've not yet looked, there may be an option to not download, use a specific, previously installed version? And you can run the code in the PR with the new option (I think effectively disabling it):
That does at least something even if the description is for the older @optlevel not the newer variant I used. But the interpreter may still be on, not sure. See also: SciML/diffeqpy#97 |
Thanks for the PR. I'm hesitant to do something like this because it's reducing the startup time at the expense of making everything a bit slower afterwards. If this slow-down is negligible then fine, but I don't have the time at the moment to investigate if this is the case. By default PythonCall should download the latest version of Python. Except that due to a bug in Conda, it is currently pinned to 3.9 or less, but this restriction should go away soon. You can use a preinstalled Python by setting the environment variable |
I understand you hesitation, and it may be warranted. You could merge on master first as is, to get people to test... or change to -O1 as done at PyCall: https://github.com/JuliaPy/PyCall.jl/blob/master/src/PyCall.jl i.e. without --compile=min, I may have gone overboard there, as it triggers the interpreter. EDIT: Also something to keep track of: JuliaLang/julia#43370 |
I did something like this on the dependencies MicroMamba and CondaPkg a while ago. It brought the load time of PythonCall down quite a bit. I don't want to apply the same trick to the whole of PythonCall though right now because it will slow things down at run time. Thanks for the tip about |
EDIT: To answer my issue here, just getting red of (or to be safe, for now moving) worked as I though it should:
I guess "free" isn't supposed to work, to not lose your changes, unless you made none, so you need to figure out above yourself. I'm trying to help more, but I get a downgrade:
I'm not sure this is usual, free didn't work (as I think it should), or just very unusual, e.g. with your package. I see similar here (by no answer): https://discourse.julialang.org/t/pkg-develop-causing-package-to-downgrade/41484 |
No description provided.