Skip to content
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

🧐[问题]流式输出感觉很卡顿 #121

Open
lolocoo opened this issue Mar 11, 2024 · 12 comments
Open

🧐[问题]流式输出感觉很卡顿 #121

lolocoo opened this issue Mar 11, 2024 · 12 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@lolocoo
Copy link

lolocoo commented Mar 11, 2024

🧐 问题描述

流式输出ui展示感觉不是很流畅,感觉一卡一卡的。

💻 示例代码

🚑 其他信息

@ONLY-yours
Copy link
Collaborator

新版本已经优化过一版本了,现在应该很平滑?你是什么版本的呢?

@FrancisKong
Copy link

我也遇到同样问题,版本是 1.10.2,开发模式输出时会出现下面的警告信息:

Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.

警告定位到这一行代码

animationTimeoutId = setTimeout(updateText, 16); // 16 毫秒的延迟模拟打字机效果

@ONLY-yours
Copy link
Collaborator

试试1.10.3? waring还在么?

@FrancisKong
Copy link

错误还在,发送按钮的 loading 动画也很卡顿

@ONLY-yours
Copy link
Collaborator

错误还在,发送按钮的 loading 动画也很卡顿

能在给点详细信息么?

我在 React 18、NextJs14下,浏览器的话 Edge 和 Chrome 都没有复现这个问题

@ONLY-yours ONLY-yours added the help wanted Extra attention is needed label Mar 13, 2024
@liguobao
Copy link

liguobao commented Mar 13, 2024

我也遇到同样问题,版本是 1.10.2,开发模式输出时会出现下面的警告信息:

Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.

警告定位到这一行代码

animationTimeoutId = setTimeout(updateText, 16); // 16 毫秒的延迟模拟打字机效果

这个错误我这边也会发生,不过卡顿程度来说倒还好。

同时Loading 自动听下来效果不间断失效,已确定服务端返回了 DONE消息。

@ONLY-yours
Copy link
Collaborator

同时Loading 自动听下来效果不间断失效,已确定服务端返回了 DONE消息。

不间断失效的问题在 1.11.0 版本中一并修复了,现在还会出现么

@liguobao
Copy link

liguobao commented Mar 15, 2024 via email

@FrancisKong
Copy link

错误还在,发送按钮的 loading 动画也很卡顿

能在给点详细信息么?

我在 React 18、NextJs14下,浏览器的话 Edge 和 Chrome 都没有复现这个问题

我测试了下,第一轮对话的时候是没问题的,但当对话的轮次多时就变卡了。
升级了新版本 1.11.0 还存在这个问题

@liguobao
Copy link

错误还在,发送按钮的 loading 动画也很卡顿

能在给点详细信息么?
我在 React 18、NextJs14下,浏览器的话 Edge 和 Chrome 都没有复现这个问题

我测试了下,第一轮对话的时候是没问题的,但当对话的轮次多时就变卡了。 升级了新版本 1.11.0 还存在这个问题

大概是5次左右对吧?

@ONLY-yours ONLY-yours added the good first issue Good for newcomers label Mar 18, 2024
@misakayao
Copy link

使用1.11.0也遇到了,使用ReadableStream封装了流式返回,controller.enqueue多次控制台就会显示Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.

@liguobao
Copy link

升级到1.12.1依旧还是这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants