How to find out why my dll has grown so much

The DLL I was working on has grown a lot lately. Are there any tools that will tell me what is responsible for this? For example, is it a template that is created too many times, or maybe a third-party library, or maybe it boosts it?

I am looking for a kind of profiler that looks at size, not performance.

+4
source share
2 answers

Are you talking about DLL size in bytes? Try using the dumpbin utility. This may show you that inside your DLL./ARCHIVEMEMBERS should show you separate object modules.

http://support.microsoft.com/kb/177429

+7
source

If your DLL has other dependencies and you use the STATIC binding to associate your DLL with them, you can expect your DLL to become larger:

Static Link and Dynamic Link

  • Static linking can facilitate the distribution of binary files in various user environments (by sending a larger and more resource-intensive program).

EDIT:

I found the answers in this thread are quite interesting for your problem: Profiling DLL / LIB Bloat

But an interesting experiment would be to make sure that for each instance of the template, the resulting size of the executable file grows linearly. If so, you know that the problem is creating an instance of the template. There's a decent article here that talks about this type of problem and is a refactoring method.

EDIT:

There is a high chance that your problem is with using boost headers. Check this topic to find out why: Why does using boost increase file size?

+3
source

All Articles