24479

Speeding up obfuscation process

Question:

So, I've got a moderately to significantly complicated WPF application that I've got a requirement to obfuscate the output assemblies via Dotfuscator (pro edition - the one the client has a license for).

Three issues:

<ul><li>The obfuscation process crashes with an OutOfMemoryException approximately 85% of the time</li> <li>It takes a LONG time - the average obfuscation pass takes about <strong>56 minutes</strong> to complete</li> <li>There are a whole heap of various issues that cause the app to crash with the obfuscated assemblies, from reflection-based lookups to resources. </li> </ul>

The first problem I've been able to mitigate by running via the command line as opposed to the GUI (it doesn't crash, at least), and the third wouldn't be that big of an issue if I could quickly iterate over combinations of options instead of maybe getting 5 attempts per working day.

It's really the total time that's killing me; anyone aware of any "quick-fix" ideas to dramatically improve the time taken for obfuscation? Is it possible some goofy thing I've done is causing some sort of "Vapor-lock" during the process, increasing the processing time? Do I need to press the client to use a different obfuscator?

Some details:

<ul><li>Approx. 38 assemblies/exes in the application (of which maybe 5-10 are third party dlls marked as 'artifact' so they don't get obfuscated)</li> <li>The box is a semi-beefy physical server, not a VM.</li> <li>I'm using a config file to drive the obfuscator as opposed to processing each assembly individually.</li> <li>I've already marked a number of excludes in said config file for things like generated Resources</li> <li>All assemblies are marked as 'library'</li> </ul>

Any thoughts and/or SWAGs would be most appreciated.

Answer1:

You need more memory most likely. Dotfuscator isn't exactly lightweight in memory when running through large projects. I'd recommend 2 gigs as a minimum for most projects, and 4 gigs preferable. Also, it <em>might</em> run faster under 64-bit, due to the extra virtual memory space. Also, you might want to ensure that you're losing the latest version of Dotfuscator, since there have been some performance improvements between releases in the past

Excludes usually won't speed up Dotfuscator significantly unless you're excluding whole assemblies.

Recommend

  • A more suitable way to change submit button behaviour [duplicate]
  • Problem connecting to Python mail server from Java Camel application
  • Usage of Query System chaincode
  • Joda Time datetime invalid format with Spring
  • Maintaining/updating record order in mysql
  • Why is Apache Orc RecordReader.searchArgument() not filtering correctly?
  • XSL-FO Processor for C/C++
  • Outer product in tensorflow
  • Pyspark split interval into sub intervals
  • IntVar returning only 0 even with .get() function
  • Pass empty strings in cmake?
  • Scrapy run multiple spiders from a main spider?
  • ZKemKeeper: Events not triggering
  • Check/Uncheck - ifChecked not working
  • PHP - How to access and retrieve important data from a pop3 email account?
  • How to find unmatched rows in oracle without using set operator and join & also Query the unmatc
  • SPOJ: GENERAL (Time limit exceeded)
  • Python: Why this error is coming?
  • Overlaying text on video with required angle using FFMPEG
  • how java graphics repaint method actually works
  • NextJS auth with an external server
  • AngularJS Dynamic Directives inside ng-repeat
  • cordova edit-config not updating AndroidManifest.xml
  • Spongycastle is missing many algorithms when loaded on android
  • async GET request with body from browser
  • Expression.Call GroupBy then Select and Count()?
  • How to put an object in the air?
  • Auto send email based on the time and email address in database
  • I need a PHP mySQL Login script that directs user to specific URL based on username and password
  • How can I filter an array of dictionaries in 'updateSearchResultsForSearchController' to s
  • Sample deviceQuery cuda program
  • Android studio import problems. (Apktool)
  • Building JavaFX 2.0 App on Mac, deploying on Windows
  • How to use AJAX to upload large CSV file? [closed]
  • Request Access Token in Postman for Azure Function App protected by Azure AD B2C
  • time column in sqlite using gorm
  • When to use the tag in the head and body section of a html page? [duplicate]
  • Create an average of multiple excel chart without the data source
  • VS2010 RDLC C#. How can I set a LocalReport object to a ReportViewer?