CMFCHeadertrl :: OnFillBackground是关于Win10 Fall Creator更新的slooooooow [英] CMFCHeadertrl::OnFillBackground is slooooooow on Win10 Fall Creator update

查看:141
本文介绍了CMFCHeadertrl :: OnFillBackground是关于Win10 Fall Creator更新的slooooooow的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在Window10盒子上遇到了绝对可怕的性能,这些盒子最近出现了Fall Creators Update(不确定我的全名是否正确)。在一个我们已经跟踪的情况下,我们使用从CListCtrl派生的类,并且
是从CMFCHeaderCtrl派生的头控件。在OnPaint中,我们调用CMFCHeaderCtrl :: OnFillBackground。那个电话需要很长时间。在等待和等待时,我们开始使用调试器的break命令来查看执行的位置,并且我们不断在堆栈顶部提出
NtGDIGetPixel:

We are experiencing absolutely terrible performance on Window10 boxes that got the Fall Creators Update (not sure I have the full name correct) that came out very recently. In one case we have tracked down, we are using a class derived from CListCtrl and a header control derived from CMFCHeaderCtrl. In OnPaint, we call CMFCHeaderCtrl::OnFillBackground. That call takes a very long time. While waiting and waiting we start using the debugger's break command to see where execution is and we keep coming up with NtGDIGetPixel on the top of the stack:

 	win32u.dll!NtGdiGetPixel	Unknown
 	gdi32full.dll!GetPixel	Unknown
 	gdi32.dll!GetPixelStub	Unknown
>	mfc140ud.dll!CDC::GetPixel Line 560	C++
 	mfc140ud.dll!CMFCToolBarImages::UpdateInternalImage Line 3228	C++
 	mfc140ud.dll!CMFCToolBarImages::SmoothResize Line 4352	C++
 	mfc140ud.dll!CMenuImages::SetColor Line 188	C++
 	mfc140ud.dll!CMFCVisualManagerOffice2007::OnUpdateSystemColors Line 951	C++
 	mfc140ud.dll!CMFCVisualManager::GetInstance Line 485	C++
 	mfc140ud.dll!CMFCHeaderCtrl::OnFillBackground Line 306	C++


我们还发现对:: GetPixel的一些直接调用比以前长250倍。似乎MFC需要使用GetPixel API退出。我们正在重写我们的代码以使用DIB来获取像素。但我们无法控制
MFC代码。我们如何避免上述调用GetPixel以及在MFC中对该API的任何其他调用?
$



We have also found that some direct calls to ::GetPixel is taking up to 250 times longer than it used to. It would appear that MFC needs to quit using the GetPixel API. We are rewriting our code to use DIBs to get to pixels. But we have no control over the MFC code. How do we avoid the above call to GetPixel and any other calls to that API in MFC?


RD Holland

R.D. Holland

推荐答案

>我们在获得Fall Creators Update的Window10盒子上遇到了绝对糟糕的表现(不确定我有全名最近刚出来的。在我们跟踪的一个案例中,我们使用了从CListCtrl
派生的类和从CMFCHeaderCtrl派生的头控件。在OnPaint中,我们调用CMFCHeaderCtrl :: OnFillBackground。这个电话需要很长时间。

>We are experiencing absolutely terrible performance on Window10 boxes that got the Fall Creators Update (not sure I have the full name correct) that came out very recently. In one case we have tracked down, we are using a class derived from CListCtrl and a header control derived from CMFCHeaderCtrl. In OnPaint, we call CMFCHeaderCtrl::OnFillBackground. That call takes a very long time.

你有一个简单的项目,说明你可以分享的性能不足吗?

Do you have a simple project that illustrates the lack of performance that you can share?

我注意到您显示调试版本的跟踪是发布版本中仍存在的问题吗?

I notice from your trace that you showed a debug build, is the problem still present in a release build?

Dave


这篇关于CMFCHeadertrl :: OnFillBackground是关于Win10 Fall Creator更新的slooooooow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆