V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
520Python
V2EX  ›  Python

ChatterBot+MongoDB 做的智能(障)机器人回答问题速度超级慢,有什么方法解决这个问题吗?

  •  
  •   520Python · 2020-04-29 10:02:26 +08:00 · 1730 次点击
    这是一个创建于 1472 天前的主题,其中的信息可能已经有所发展或是发生改变。
    ChatterBot+MongoDB 做的智能(障)机器人,用小黄鸡语料训练了中文语料,Mongo 库里查下到数据有 20 万条,聊天时机器人回答问题速度超级慢,回答一个问题要 30 秒以上。有什么方法解决这个问题吗?
    3 条回复    2020-04-29 13:20:18 +08:00
    ericls
        1
    ericls  
       2020-04-29 10:14:46 +08:00
    20 万数据什么形状?可不可以加 index ?
    ohao
        2
    ohao  
       2020-04-29 10:28:02 +08:00
    你要确认瓶颈在哪里, 然后针对性优化
    先确认是硬件瓶颈还是软件瓶颈,然后是数据库瓶颈还是逻辑瓶颈

    针对性解决
    这个没头没尾的别人也不好建议
    luozic
        3
    luozic  
       2020-04-29 13:20:18 +08:00
    到底哪慢? 链路跟踪一下,切片研究一下。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3180 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 14:08 · PVG 22:08 · LAX 07:08 · JFK 10:08
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.