Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Apr : DisableThreadLibraryCalls mystery

www.cryer.info
Managed Newsgroup Archive

DisableThreadLibraryCalls mystery

Subject:DisableThreadLibraryCalls mystery
Posted by:"Peter Sirca" (psirca..@movegmail.com)
Date:24 Apr 2006 02:55:28 -0700

Hi all,

can anyone give an explanation for the following :


Delphi application
  invokes Delphi COM dll,
    which creates a thread that invokes other (C++) dlls via COM
    and registers COM callbacks.


Delphi COM dll displays information in a form as it receives callbacks
from C++ COM dlls which run some intensive computations and access the
disk. C++ dlls creates a couple more threads, but no more than 5.


Delphi COM dll used to call DisableThreadLibraryCalls in the
initialization of one of the units. Just removing this call, increased
the overall performance by cca 25%. Profiling the Delphi dll did not
dislose any significant info - in both cases, 98% all the time seems to
be spent in C++ calculation code.


Anyone ????????


Thanks,
  Peter

Info

Glossary

Replies:

www.cryer.info
Managed Newsgroup Archive