Re: [xml] wrong compiler settings for MSVC in makefile




I am not sure, why MS has to use different runtimes ...
My $0.02 with a history overview for the problem:

Different runtime libraries show up in MS world because MS DOS was not
multithreaded. When it was decided to do threads in Windows it was realised
that the runtime had to be almost completely re-written because in
multithreaded case you need to do a little bit more than you have to
do when there is only one thread (for example, you need to have a copy
of "errno" variable in each thread).

Rewriting the whole thing was ... a little bit scary. Plus these additional
things slowed down everything (remember, it was 286 and 30Mhz). Plus they
require additional memory (remember again that 640Kb was *a lot* of
memory then).

Thus Windows was shipped with 2 sets of runtime. Interesting thing is that
most of original Windows apps (calculator, notepad, etc.) were linked against
single threaded runtime :)

After that we got DLL versions (no idea why one needs non-DLL) and debug
version for developers (remember, there is no source code that you can
compile yourself).

Now almost 20 years later these problems look strange. I would bet that
nobody will be able to produce any trustworthy results that shows single threaded
runtime faster than multithreaded. And I don't even mention memory usage :)

However, MS continues to ship single threaded dlls for compatibility reasons.
At some point before XP they even had a note on MSDN web site with a warning
that the single threaded dlls might go away in XP. But I guess they had had
enough compatibility issues with XP even with included single threaded runtime.
Thus the note was removed and single threaded runtime is still included
in Windows XP.

Bottom line.
---------------
IMHO, there are only few reasons
to use single threaded runtime in your
application these days:


    1) You have 286 box with 640Kb memory
    2) There is some legacy code compiled against single threaded runtime w/o
    source code or a guy who wrote it left the company 10 years ago.
    3) You don't know how to change the default settings in MS Visual Studio.

Finally, changing flags in Makefile and recompiling libxml by yourself is always
an option :)

If someone would prepare a patch and provide configure.js option to change
runtime then I would be really really really glad if multithreaded runtime would be
used by default.

Aleksey




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]