Flex 对某些 php 脚本的响应极其缓慢
我正在修复一个 php 脚本来接收 byte64 编码的图像并将其存储到数据库
这是我的问题,当 flash 调用脚本(通过 post 请求)时,脚本需要很长时间(有时长达 5 分钟)才能响应
(i用一个非常小的图像进行测试)
如果我从请求中删除 byte64 编码的数据,它加载速度很快,如果我从浏览器调用没有数据的脚本,速度很快
我尝试从脚本文件中删除所有 php 脚本,所以没有 php已运行,并带有数据还是很慢。
我的猜测是,这与服务器有关,但我不知道这可能是什么,除了它必须在 php 运行之前发生。
我的网站上没有 htaccess 文件,
I am fixing up a php script to recieve a byte64 encoded image and store it to database
Here is my problem the script takes very long time, sometimes up to 5 minutes, to respond when flash calls the script(via a post request)
(i test it with a very small image)
if i remove the byte64 encoded data from the request it loads fast, and if i call the script from the browser with no data it is fast
i tried removing all php script from the script file so no php is run, and with data it is still slow.
My guess is that this is somehow server related, but i have no clue what this could be, other than it must happen before php is run.
and i have no htaccess file on the site,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
“如果我从请求中删除 byte64 编码的数据,它会快速加载”,
这样您就可以确切地知道您发出的位置。测试查询,如果它们不可优化,请以正常方式存储图像。
"if i remove the byte64 encoded data from the request it loads fast"
So you know exactly where you issue is at. Test the queries, if they're not optimizable, store your images the normal way.
我最终将脚本重写为正常上传,然后将它们存储为文件,将图像存储在数据库中是不好的魔力,但当时试图避免重写整个脚本:)
但感谢您的时间!
i ended up rewriting the script to a normal upload and then store them as files, storing images in DB is bad mojo, but was trying to avoid having to rewrite the intire script at the time :)
but thanks for your time!