-
Notifications
You must be signed in to change notification settings - Fork 9
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
[Performance] The delay of sending images #71
Comments
|
with https://github.com/cssxsh/pixiv-helper/releases/tag/v1.9.2 remove: PixivImageResource 应该会好不少 |
PixivHelper v1.9.1随机的 PixivHelper v1.9.2环境:使用的还是mysql,重建了一个database;Hibernate配置文件连同release一起更新了一下。 注明:转发16张,总共50mb的图片耗时20s左右(其中出现了一张19mb的超大图片); 初步测试的环境:群内、私聊环境依次发送随机图片的/boom,一旦bot转发完毕立即开始下一轮 总结:合成转发消息的速度得到了质的飞跃; |
其实还有一个优化点是 同时上传图片,目前是同步顺序上传,可以改成异步并发上传,但是不确定mirai或者腾讯的服务器是否支持这一操作 |
可能可行,我之前部署sagiri对接mirai的时候是用到异步的,虽然因为并发数据库被锁之后没用过了() |
描述:
经过初步测试,导致这个问题的原因应该和【服务器占用】和【数据库处理效率】有关:
如正在缓存图片时发送指令没有反应的;
使用boom或者同时多人连续发送ero时延迟十分高;
然而我的2h4g服务器测试过过sqlite和mysql,效果都不尽人意,即使占用没有拉满:
有点不应该,mysql的处理速度应该更快才对
单色图延迟
直接描述:发送ero没有反应,过了几分钟或更长时间,bot会把漏下的全发给你。
合成转发消息延迟
不知为何,一旦我使用boom(随机)指令(标准是默认的16张)
bot一定要等十几分钟到一个小时不等(/boom 2 3分钟才发给我)才会转发给你。越少boom越快
总结:
事实上并没有准确的【吞指令】一说,只要延迟够高,就相当于吞了。
多指令--多图片并发 的时候,bot处理会非常非常的慢;同时有可能直接摆烂一个小时。
我其实在本服务器上用过其他bot的色图插件,连续处理5张合并转发的色图只需要3s左右,效率还是很高的。
The text was updated successfully, but these errors were encountered: