Open Bug 1545139 Opened 2 years ago Updated 1 year ago

Windows widget code causes Windows to go read Windows\Fonts\staticcache.dat file

Categories

(Core :: Widget: Win32, defect, P3)

Unspecified
Windows 7
defect

Tracking

()

Tracking Status
firefox68 --- affected

People

(Reporter: Gijs, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: main-thread-io, perf, Whiteboard: [fxperf:p3][fxperfsize:L])

Stack:

nsresult mozilla::net::nsLoadGroup::RemoveRequest(class nsIRequest *, class nsISupports *, nsresult) [xul.dll]
nsDocLoader::OnStopRequest(nsIRequest *,nsresult) [xul.dll]
void nsDocLoader::DocLoaderIsEmpty(bool) [xul.dll]
void nsDocLoader::doStopDocumentLoad(class nsIRequest *, nsresult) [xul.dll]
void nsDocLoader::DoFireOnStateChange(class nsIWebProgress *, class nsIRequest *, int & const, const nsresult) [xul.dll]
nsresult nsWebShellWindow::OnStateChange(class nsIWebProgress *, class nsIRequest *, unsigned int, nsresult) [xul.dll]
void nsXULWindow::OnChromeLoaded() [xul.dll]
void nsXULWindow::SyncAttributesToWidget() [xul.dll]
nsresult nsWindow::SetNonClientMargins(struct mozilla::gfx::IntMarginTyped<mozilla::LayoutDevicePixel> & const) [xul.dll]
bool nsWindow::UpdateNonClientMargins(int, bool) [xul.dll]
void nsWindow::ResetLayout() [xul.dll]
ZwUserSetWindowPos [user32.dll]
KiUserCallbackDispatcherContinue [ntdll.dll]
_fnDWORD [user32.dll]
DispatchClientMessage [user32.dll]
GetRealWindowOwner [user32.dll]
static __int64 nsWindow::WindowProc(struct HWND__ *, unsigned int, unsigned __int64, __int64) [xul.dll]
static __int64 nsWindow::WindowProcInternal(struct HWND__ *, unsigned int, unsigned __int64, __int64) [xul.dll]
CallWindowProcW [user32.dll]
CallWindowProcAorW [user32.dll]
UserCallWinProcCheckWow [user32.dll]
GetRealWindowOwner [user32.dll]
ThemeDefWindowProcW [UxTheme.dll]
_ThemeDefWindowProc(HWND__ *,unsigned int,unsigned __int64,__int64,int) [UxTheme.dll]
OnDwpNcPaint(CThemeWnd *,_THEME_MSG *) [UxTheme.dll]
CThemeWnd::NcPaint(HDC__ *,unsigned long,HRGN__ *,_NCPAINTOVERIDE *) [UxTheme.dll]
CThemeWnd::GetNcWindowMetrics(tagRECT const *,_NCWNDMET * *,_NCTHEMEMET *,unsigned long) [UxTheme.dll]
_GetNcCaptionTextSize(void *,HWND__ *,HFONT__ *,tagSIZE *) [UxTheme.dll]
GetThemeTextExtent [UxTheme.dll]
CTextDraw::GetTextExtent(CRenderObj *,HDC__ *,int,int,unsigned short const *,int,unsigned long,tagRECT const *,tagRECT *) [UxTheme.dll]
DrawTextExW [user32.dll]
DrawTextExWorker [user32.dll]
DT_GetLineBreak [user32.dll]
DT_DrawStr [user32.dll]
LpkDrawTextEx [LPK.dll]
LpkCharsetDraw [LPK.dll]
ScriptStringAnalyse [USP10.dll]
ScriptCheckCache(void * *,int,HDC__ *) [USP10.dll]
UpdateCache(void * *,int,HDC__ *) [USP10.dll]
FindOrCreateSizeCacheUsingRealizationID(HDC__ *,SIZE_CACHE * *) [USP10.dll]
FindOrCreateSizeCacheWithoutRealizationID(HDC__ *,SIZE_CACHE * *) [USP10.dll]
FindOrCreateFaceCache(HDC__ *,FACEMETRICS *,FACE_CACHE * *) [USP10.dll]
LoadFont(HDC__ *,FACE_CACHE *) [USP10.dll]
InitUnistor() [USP10.dll]
UniStorInit(wchar_t const *,int,long (*)(unsigned __int64,void * *),long (*)(void *),void * *,unsigned long *) [USP10.dll]
CreateFileWImplementation [kernel32.dll]
CreateFileW [KERNELBASE.dll]

This doesn't happen on Windows 10, does happen on win7. Unsure about win8. It happens in the default configuration, ie when using tabs in titlebar.

I'm wondering if the resetlayout call really needs to happen. This generally seems like somewhat odd code; the NC margins shouldn't really change much given that we default to having tabs in titlebar, so I don't understand why we need to get NC caption text sizes, though I guess we don't control the Windows side of the code here.

This might be intractable, it depends a bit on whether we can avoid this call on the Firefox side.

Whiteboard: [fxperf] → [fxperf][fxperfsize:L]
Whiteboard: [fxperf][fxperfsize:L] → [fxperf:p3][fxperfsize:L]

The priority flag is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Flags: needinfo?(jmathies)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.