-
Notifications
You must be signed in to change notification settings - Fork 636
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
DYN-6449 Graph Loading Performance Improving #14929
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
using System; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.Specialized; | ||
using System.Diagnostics; | ||
|
@@ -551,6 +551,9 @@ private void OnNodeViewMouseLeave(object sender, MouseEventArgs e) | |
{ | ||
ViewModel.ZIndex = oldZIndex; | ||
|
||
//Watch nodes doesn't have Preview so we should avoid to use any method/property in PreviewControl class due that Preview is created automatically | ||
if (ViewModel.NodeModel != null && ViewModel.NodeModel is CoreNodeModels.Watch) return; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this only apply to watch node? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, When running dotTrace I noticed that we were creating the PreviewControl for Watch node when this kind of nodes doesn't have Preview. |
||
// If mouse in over node/preview control or preview control is pined, we can not hide preview control. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. another Idea would be to stop loading controls that are not immediately visible to the user (like context menu stuff, tooltips etc) These could be loaded on demand when the user interacts with the UI. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pinzart90 I think for this case we will need a specific Jira task since I noticed that just the PreviewControl is being used in several places and due to the current implementation of this property, when you use it automatically creates the instance. This is the declaration of the Property and the references in code There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, a lot of code assumes the existence of the PreviewControl. We should create a task for it if we can say for sure it would benefit performance. |
||
if (IsMouseOver || PreviewControl.IsMouseOver || PreviewControl.StaysOpen || IsMouseInsidePreview(e) || | ||
(Mouse.Captured is DragCanvas && IsMouseInsideNodeOrPreview(e.GetPosition(this)))) return; | ||
|
@@ -731,6 +734,9 @@ internal void TogglePreviewControlAllowance() | |
{ | ||
previewEnabled = !previewEnabled; | ||
|
||
//Watch nodes doesn't have Preview so we should avoid to use any method/property in PreviewControl class due that Preview is created automatically | ||
if (ViewModel.NodeModel != null && ViewModel.NodeModel is CoreNodeModels.Watch) return; | ||
|
||
if (previewEnabled == false && !PreviewControl.StaysOpen) | ||
{ | ||
if (PreviewControl.IsExpanded) | ||
|
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.
Was this moved to other places based on your PR description?
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.
Updated the PR description