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
perf: increasing the editor performance #4445
Conversation
A function to debounce editor updates was added to the DefaultEditor.vue component. This change was necessary to prevent excessive event executions. Now, 'update:raw', 'update:content', and 'update' events will be emitted 250ms after the last update, reducing the number of redundant operations and increasing the editor's performance.
Codecov Report
@@ Coverage Diff @@
## main #4445 +/- ##
=========================================
Coverage 61.05% 61.05%
Complexity 2515 2515
=========================================
Files 372 372
Lines 12926 12926
Branches 929 929
=========================================
Hits 7892 7892
Misses 4579 4579
Partials 455 455 |
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: JohnNiang 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 |
A function to debounce editor updates was added to the DefaultEditor.vue component. This change was necessary to prevent excessive event executions. Now, 'update:raw', 'update:content', and 'update' events will be emitted 250ms after the last update, reducing the number of redundant operations and increasing the editor's performance.
What type of PR is this?
/kind improvement
What this PR does / why we need it:
目前默认编辑器在文章内容过多时,会出现输入延迟。
Which issue(s) this PR fixes:
Fixes #4389
Special notes for your reviewer:
Does this PR introduce a user-facing change?