Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

perf: asynchronously load the emoji data of the comment reply component #798

Merged
merged 1 commit into from
Dec 26, 2022

Conversation

ruibaby
Copy link
Member

@ruibaby ruibaby commented Dec 24, 2022

What type of PR is this?

/kind improvement

What this PR does / why we need it:

优化评论回复组件的 emoji 数据加载,改为异步的方式。

构建结果对比:

优化前:

image

优化后:

image

首次请求对比:

优化前:

image

优化后:

image

最终会在打开 emoji 组件的时候才加载 emoji 数据:

image

Which issue(s) this PR fixes:

Fixes halo-dev/halo#3039

Special notes for your reviewer:

测试方式:

  1. 检查回复组件的 Emoji 选择功能是否正常即可。

Does this PR introduce a user-facing change?

Console 端的评论回复 Emoji 组件数据改为异步加载,优化整体的加载性能。

@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/improvement Categorizes issue or PR as related to a improvement. labels Dec 24, 2022
@vercel
Copy link

vercel bot commented Dec 24, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ui ✅ Ready (Inspect) Visit Preview Dec 24, 2022 at 10:03AM (UTC)

Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Dec 25, 2022
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Dec 26, 2022

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 26, 2022
@f2c-ci-robot f2c-ci-robot bot merged commit b29a72d into halo-dev:main Dec 26, 2022
@ruibaby ruibaby deleted the perf/comment-reply-emoji branch December 26, 2022 06:26
@ruibaby ruibaby modified the milestones: 2.1.x, 2.1.0 Dec 26, 2022
JohnNiang pushed a commit to JohnNiang/halo that referenced this pull request Mar 2, 2023
…nt (halo-dev/console#798)

#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

优化评论回复组件的 emoji 数据加载,改为异步的方式。

构建结果对比:

优化前:

<img width="475" alt="image" src="https://user-images.githubusercontent.com/21301288/209430764-25e42624-25d7-4466-a184-4fc82d310e12.png">

优化后:

<img width="473" alt="image" src="https://user-images.githubusercontent.com/21301288/209430752-1bc064e5-f3bd-42f4-b93c-8f2e200a00e3.png">

首次请求对比:

优化前:

<img width="1067" alt="image" src="https://user-images.githubusercontent.com/21301288/209430904-79c9c403-a627-44ea-a97b-13e653230b23.png">

优化后:

<img width="1066" alt="image" src="https://user-images.githubusercontent.com/21301288/209430936-e446659c-a20a-437c-bd9f-4408279410af.png">

最终会在打开 emoji 组件的时候才加载 emoji 数据:

<img width="1460" alt="image" src="https://user-images.githubusercontent.com/21301288/209430963-f2cb66c6-c0e3-4cc5-8906-66db94d40ca8.png">


#### Which issue(s) this PR fixes:

Fixes halo-dev#3039

#### Special notes for your reviewer:

测试方式:

1. 检查回复组件的 Emoji 选择功能是否正常即可。

#### Does this PR introduce a user-facing change?

```release-note
Console 端的评论回复 Emoji 组件数据改为异步加载,优化整体的加载性能。
```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/improvement Categorizes issue or PR as related to a improvement. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

异步加载 Console 端回复评论组件的 emoji 表情数据
3 participants