Azure / Azure/azure-functions-python-library

HttpRequest.files performance issue

未关闭
#69 1 条评论 0 个 reaction 已指派 1 人 已被 @Hazhzeng 认领 在 GitHub 查看
主要语言
Python
星标
179
派生
79
平均合并
2 天 8 小时
30 天内合并 PR
2

描述

I'm attempting write a simple Azure Function that reads an XML file sent in using multipart/form-data as seen in the below curl sample (the file is about 7.5MB).
```
curl --location --request POST 'http://localhost:7071/api/HttpTrigger1' \
--header 'Content-Type: multipart/form-data' \
--form 'gpxFile=@/C:/somefile.XML'
```
When I use this line of code using the Azure Functions Python Library to access the data:
`x = req.files.get('gpxFile').stream.read().decode("utf-8")`
I'm seeing about 15 second response times.

A similar line using Flask:
`x = request.files['gpxFile'].read().decode("utf-8")`
returns in about 1.5 seconds.

Am I using the HttpRequest object incorrectly? If not, why does Flask request respond so much quicker then the Azure HttpRequest?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。