-
Notifications
You must be signed in to change notification settings - Fork 370
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
[Bug Report] 关于setValue开启保持光标位置的性能问题 #720
Labels
bug
Something isn't working
Comments
可以在 api playground 编辑代码试试是否能复现。https://tencent.github.io/cherry-markdown/examples/api.html 最好是能提供一下脱敏后结构相似可复现的文本,以便我们排查问题。 |
我在用例中交替使用下面两个字符setMarkdown时肉眼可见的观测出了渲染延迟:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Describe the Bug
使用中发现setMarkdown时如果开启保持光标位置功能的话,在某些场景下会导致加载明显变慢,初步定位是这段计算导致的
这里对cursor的计算会占用大量时间,由于我这里是编译后的代码调试没有继续去定位是计算cursor还是前面计算pos导致的性能问题,麻烦看下这里的计算逻辑是否还能进行优化
由于是由生产数据观测到的问题我这里没办法给您提供复现的样例,您可以尝试输入一段较长的内容进行setMarkdown看看是否能够复现
同时我还有一点无关痛痒的疑问,在setMarkdown这个过程中他甚至阻塞了我页面上添加的loading的更新(由react状态控制),这是和渲染机制有关吗
Reproduction Steps
No response
System Information
No response
Contributing
None
The text was updated successfully, but these errors were encountered: