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
Functions run very slow when importing libraries [lang-Python] #1626
Comments
Unfortunately this is expected behavior right now. You're hitting a combination of two separate issues:
Our support for python will probably stay in "experimental" mode until issue (1) is solved. |
@paulbatum I hit into this as well. By moving away from ConsumptionPlan to AppServicePlan, I manage to reduce the load time from 30 sec to 10 sec but still not quite acceptable for production use.
|
@ylbillyli Sorry but I'm not aware of any good workarounds. Also you should not be looking at using the python support in production as its still considered an experimental feature. I would try using App Service (i.e. a web app) for your scenario. There are some docs on using python in App Service here. |
@paulbatum do u have an update on this? Our python app might need to go live soon. Before migrating everything we have already setup from function app to web app, I just want to check if this issue is anywhere close to be resolved soon? Alternatively, do you think I can wrap it in c# and store the Process in a static variable, start the process and never stop it and use it like this https://stackoverflow.com/questions/43876965/using-c-sharp-for-input-and-output-to-python ? |
hi bily, |
or move to AWS lambdas :-) I just like azure because it is simpler. deployment and security on AWS is hell |
Any updates? |
There is some work in progress on an implementation of python support for functions V2 that does not have the severe performance problems of the experimental support in V1, and you can track the progress of that here: |
imports of libraries such as numpy and pandas cause function to be very slow (20-30 seconds)
Repro steps
import pandas
Related information
python
The text was updated successfully, but these errors were encountered: