Faster obfuscation

So, I have a rather complicated WPF application that has a requirement to obfuscate output assemblies through Dotfuscator (pro edition is the one for which the client has a license).

Three questions:

  • OutOfMemoryException process crashes with OutOfMemoryException about 85% of cases
  • It takes a long time - the average obfuscation pass takes about 56 minutes to complete
  • There are a whole bunch of different problems due to which the application crashes with obfuscated assemblies, from reflection-based searches to resources.

The first problem that I was able to mitigate by running it through the command line, as opposed to the GUI (it is at least not a failure), and the third would not be such a big problem if I can quickly iterate through combinations of options instead of getting 5 attempts per working day.

This is really the total time killing me; who knows any โ€œquick-actingโ€ ideas to significantly improve the time taken to obfuscate? Is it possible that some stupid thing I did causes some kind of โ€œsteam lockโ€ during the process, increasing the processing time? Do I need to click on a client to use another obfuscator?

Some information:

  • Approx 38 builds / exes in the application (of which perhaps 5-10 are third-party DLLs that are marked as โ€œartifactโ€, so they do not become confusing).
  • The box is a semi-rigid physical server, not a virtual machine.
  • I use the configuration file to control the obfuscator, and not to process each assembly separately.
  • I already noted a number of exceptions in the specified configuration file for things like generated resources.
  • All assemblies are marked as "library"

Any thoughts and / or SWAGs would be most appreciated.

+2
source share
1 answer

Most likely you need more memory. Dotfuscator is not quite easy to remember when working with large projects. I would recommend 2 concerts for at least most projects, and 4 concerts are preferable. In addition, it can run faster than 64-bit due to the extra virtual memory space. You might also want you to lose the latest version of Dotfuscator, as there have been some performance improvements between releases in the past.

Eliminates, as a rule, it will not significantly speed up Dotfuscator, unless you exclude entire assemblies.

+1
source

Source: https://habr.com/ru/post/944227/


All Articles