Recently I was trying to debug into one mysterious issue where the DockManager from DevExpress is so slow when certain theme is applied.
And I have noticed that there are hotspot such as AddLogicalTree and RemoveLogicalChild on the performance counter.
Below is a analysis on the result of analysis.
When I drap out a window from the dock manager and put that into a floating group, what I have observed is that first
1. RemoveLogicalChild is called on its existing logical parent (I blieve that the DockingManager must have certains groups such as FloatingGroup and DockingGroup so that each item/tab falls part of ..)
Where then the detached item will be added into a new container, and the AddLogicalChild is called. 
and then this Item will be boxed into a new group, which you will see again the AddLogicalChild called again.
Also, as I noticed that when a Item detached from the DockingManager and become part of the floating window, you will see the WndProc will be invoked.

so the analysis of the result is that extensively uses of the styling through template. Where the logicalTree adding/removing will trigger a huge amount of recalculationg - creating those VisualElement and others will severely bog down the performance. - As that Styling through the Template can be confirmed though this MSDN page - FrameworkElement.AddLogicalChild. method.
And this has posed a very interesting question, how do you get the styling done whiles keep the performance.

本文分析了DevExpress DockManager在特定主题下出现性能问题的原因。通过性能计数器发现热点问题集中在AddLogicalTree和RemoveLogicalChild方法。深入研究发现频繁的样式调整及逻辑树的增删操作导致大量视觉元素的重新计算,严重影响性能。
429

被折叠的 条评论
为什么被折叠?



