-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
fix: optimize editor performance and resolve freezing issues #4805
Conversation
/area console |
@LIlGG: once the present PR merges, I will cherry-pick it on top of release-2.10 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Codecov Report
@@ Coverage Diff @@
## main #4805 +/- ##
=========================================
Coverage 61.49% 61.49%
Complexity 2805 2805
=========================================
Files 405 405
Lines 14804 14804
Branches 1030 1030
=========================================
Hits 9103 9103
Misses 5205 5205
Partials 496 496 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
New changes are detected. LGTM label has been removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ruibaby The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
优化了编辑器的性能,并解决了卡死现象。具体措施如下:
markRaw
将其转为普通对象,可以优化 vue 性能。DefaultEditor
有多个根节点导致透传的 attrs 无法设置,因此新增一个 div 节点将其原有节点包裹。参见 https://cn.vuejs.org/guide/components/attrs.html#attribute-inheritance-on-multiple-root-nodes 。onBeforeUnmount
时间中手动释放编辑器实例。How to test it?
Which issue(s) this PR fixes:
Fixes #4798
Does this PR introduce a user-facing change?