views:

240

answers:

3

I just found out that my program is losing 5% execution speed when it go through dotfuscator community edition.

is that normal? what could be an alternative(free) to dotfuscator that wouldn't do that?

+1  A: 

Yes, this is a side effect of obfuscation. There might be some other ones like Salamander that give better performance but this is a side effect of obfuscation.

BobbyShaftoe
+1  A: 

One of the things an obfuscator does is obfuscate literals in your code, particularly literal strings. These literals must be un-obfuscated at runtime. String processing is not particularly fast.

Justice
Throw all the strings into a resource file and that should eliminate that problem.
Robert C. Barth
+1  A: 

Since you are using the free version of Dotfuscator, which only performs renaming, your performance issue is most likely not related to any overhead in the obfuscation of string literals (since that functionality is not in that version).

If you are using serialization and are running sgen on your assemblies prior to obfuscating them and not including the sgen assemblies that can cause performance issues.

On it's own renaming is normally performance neutral to performance enhancing due to smaller binary sizes and reduced string table sizes. One thing I would recommend would be to run a profiler on the obfuscated program and try to find the hotspots which may give you some leads into areas that may contain a clue to the problem.

Joe Kuemerle