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

perf: [desktop-fileinfo] The cpu usage is high when the mouse clicks … #2430

Conversation

GongHeng2017
Copy link
Contributor

…the desktop icon

  1. When the icon of a desktop file is in svg format and the mouse moves over the file, QIcon is frequently invoked to create an object, resulting in high cpu usage.
  2. svg availableSizes returns a null value, causing the cache QIcon to be emptied, resulting in not only a rebuild, but also a high cpu utilization.
  3. Remove the judgment of availableSizes.

Log: fix issue
Bug: https://pms.uniontech.com/bug-view-289327.html

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: GongHeng2017, max-lvs

The full list of commands accepted by this bot can be found 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

@GongHeng2017
Copy link
Contributor Author

/merge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Nov 26, 2024

This pr cannot be merged! (status: blocked)

@GongHeng2017
Copy link
Contributor Author

/merge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Nov 28, 2024

This pr cannot be merged! (status: behind)

…the desktop icon

1. When the icon of a desktop file is in svg format and the mouse moves over the file,
QIcon is frequently invoked to create an object, resulting in high cpu usage.
2. svg availableSizes returns a null value, causing the cache QIcon to be emptied,
resulting in not only a rebuild, but also a high cpu utilization.
3. Remove the judgment of availableSizes.

Log: fix issue
Bug: https://pms.uniontech.com/bug-view-289327.html
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • 代码简化了fileIcon函数的逻辑,移除了不必要的if语句,提高了代码的可读性。

是否建议立即修改:

  • 否,因为这次提交的修改是合理的,没有发现需要立即修改的问题。

@GongHeng2017
Copy link
Contributor Author

/merge

@deepin-bot deepin-bot bot merged commit 0c3b887 into linuxdeepin:release/eagle Nov 30, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants