-
Notifications
You must be signed in to change notification settings - Fork 293
Slim packages by using cache #260
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
Comments
Intereseting idea. But as they meniont, its a very small differenc compared to the .py files. It might make it a bit faster too tho. Currently, since it doesn't require a trick (moving files around) the slim option deletes the pyc files instead. It'd be interesting to do the otherway around as mapbox is doing, but that'll be a bit more complicated. But also.. I didn't realize this. this is good to know:
|
Deleting pyc files makes cold start slower. I would leave them as is. |
I don't remember the exact portability of pyc files. Namely, can a python3.6 pyc file from windows or mac os be used with python3.6 in linux? |
Linked from the original post this post suggests:
|
Maybe #276 could solve this. You could exclude |
Hey 👋 I'm closing this ticket as it looks like it's heavily outdated, we can of course reopen it if needed 👍 |
Would it be possible to slim packages by only keeping the Python bytecode?
Mapbox have seemingly been able to come up with some commands to move the pyc files into place so they are used instead of the py files (we can't really edit the source python files once it's on lambda anyway) -- https://blog.mapbox.com/aws-lambda-python-magic-e0f6a407ffc6 see "Magic trick"
The text was updated successfully, but these errors were encountered: