-
Notifications
You must be signed in to change notification settings - Fork 55
pref: using map-reduce to fetch window preview for x11 #1075
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
Conversation
Reviewer's Guide by SourceryThis pull request introduces a map-reduce approach using Sequence diagram for fetching window previews with map-reducesequenceDiagram
participant AppItemWindowModel
participant AbstractWindow
participant X11Preview
AppItemWindowModel->>AppItemWindowModel: m_previewPixmaps.clear()
alt m_item is not null
loop for each window in m_item->getAppendWindows()
AppItemWindowModel->>X11Preview: fetchWindowPreview(window->id())
activate X11Preview
X11Preview-->>AppItemWindowModel: previewPixmap
deactivate X11Preview
AppItemWindowModel->>AppItemWindowModel: Store previewPixmap in m_previewPixmaps
end
end
Updated class diagram for AppItemWindowModelclassDiagram
class AppItemWindowModel {
-QHash<uint32_t, QPixmap> m_previewPixmaps
+void updatePreviewPixmaps()
-QPixmap fetchWindowPreview(uint32_t windowId)
}
note for AppItemWindowModel "Uses QtConcurrent::blockingMapped to fetch previews in parallel"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @18202781743 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding some error handling or logging within the lambda function to handle cases where
fetchWindowPreviewmight fail. - It might be worth benchmarking the performance improvement to quantify the reduction in lag.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Avoid lagging during multi window preview.
deepin pr auto review关键摘要:
是否建议立即修改:
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
Avoid lagging during multi window preview.
Summary by Sourcery
Optimize window preview fetching for X11 using map-reduce concurrency to improve performance and reduce lag during multi-window preview
Enhancements:
Build: