Skip to content
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

[Bug]: combase.dll is loaded and unloaded in every call to LocalTimeZone() on Win10 #1760

Open
daniel-eiband-snkeos opened this issue Sep 19, 2024 · 2 comments

Comments

@daniel-eiband-snkeos
Copy link

Describe the issue

When fetching the local time zone on Win10 (which happens by default if no time zone is given in calls to FormatTime()) combase.dll is loaded and the WinRT runtime is initialized for each call. This is very slow when profiling (we observed ~300ms per call in VTune) and and as a result makes profiling more or less unusable.

Even in scenarios other than profiling this seems to be excessive.

Steps to reproduce the problem

We experienced this issue when profiling with VTune. Among others, the function RoInitialize() shows up as the most expensive function when doing a gRPC call. Even though the abseil documentation says it is preferred to pass the time zone explicitly, in practice gRPC calls this function here and here. Also see: grpc/grpc#37766

What version of Abseil are you using?

20230802.1

What operating system and version are you using?

The library was compiled on Windows Server 2022 and the program is executed on Windows 10 Enterprise 22H2.

What compiler and version are you using?

MSVC build tools version 14.36.17.6

What build system are you using?

CMake via Conan

Additional context

No response

@malkia
Copy link

malkia commented Nov 23, 2024

Was just going to post about this. While getting Heap Profiles, I found that (through) gRPC this function is called a lot

image

@malkia
Copy link

malkia commented Nov 23, 2024

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants