Exports all of the DLLs for performance

To do unit testing, I had to export many small inner classes that were never intended to be consumed by clients of my DLL.

I know that every exported function results in a stub in the executable, and that the Windows loader must fix for these stubs if the DLL does not load in the preferred location.

Someone suggested creating a DLL as a static library, only for unit testing purposes.

I wonder if it's worth worrying? I could not find references to how significant the problem of exporting any class from a DLL is, or is there any significant gain in bootloader performance and memory consumption if I selectively mention it.

I think I read somewhere that the GCC compiler exports everything by default.

EDIT : since the stated motivation for the question is controversial, let me rephrase it: Should I look at DLL files and delete DLLEXPORT for all classes that are not exposed to its clients? Let's say I work with a bunch of legacy DLLs, and I noticed that they have a lot of unnecessary exports. Will this improve download speed? In particular, in Windows 7 and 8 using MSVC version 9 +.

+4
source share
1 answer

Does exporting everything from a DLL do performance?

, , , . python script, DLL, > 50 000 . 1024 , 48 (16 -, 16 16 ). 4-5 , , vtable.

SysInternals ProcMon. DLL 15-30 . DLL ~ 50 000 .

, , , , , , .

, DLL Microsoft, /bigobj, , , 64 . PE DLL. , ( ) DLL .

, , .

, DLL, , . ?

.

DLL DLLEXPORT , ?

.

- . , , -, - , . :

" , , 97% : - ". -

"" . / , . API DLL. , . , , API DLL, , ? , , ?

Test Driven Design , . DLL . , unit test ( ) .

, , , , . ( ), , .

, , , , , , .

, - , GCC .

Mingw LD . , __declspec .DEF .

+2

All Articles