Project

General

Profile

Actions

Patch #520

closed

OFMutex very slow on Windows

Added by Jörg Riesmeier over 12 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Library
Target version:
Start date:
2013-04-15
Due date:
% Done:

100%

Estimated time:
Module:
ofstd
Operating System:
Compiler:

Description

See this Forum posting:

OFMutex::lock() and OFMutex::unlock is a hotspot in our application (which uses dcmtk, obviously :-) on Windows, but not on Linux. On Windows it uses a Windows mutex object, which always require a system call to lock and unlock. Have you considered using a critical section on Windows instead? It is much faster: http://preshing.com/20111124/always-use-a-lightweight-mutex

Actions

Also available in: Atom PDF