question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow identifying parts of code that are performance-critical, and don't apply performance-affecting obfuscation there

See original GitHub issue

First things first, thank you for your work on this project, JavaScript Obfuscator, especially when combined with other minification solutions, can produce a brutally undecipherable code; our reverse engineering-protection tests are nearing that of true machine code compilation, so this is indeed getting somewhere.

Please, count on my support if this project turns out to be useful to us.

Problems with micro-optimization

Now, our use case involves a code-base that has lots of tight loops, mercilessly micro-optimized for great runtime performance (it’s an audio production suite with considerable amounts of signal processing and audio visualization of often several GB of data, and the latter must run at steady 60 FPS).

JavaScript Obfuscator, by definition, mangles these parts to make them harder to read. This, however, especially with the controlFlowFlattening option enabled, undoes the optimization badly, producing a very bad runtime performance degradation.

We actually found that virtually every single option of JavaScript Obfuscator enabled adds a clearly visible runtime performance penalty.

“Standard” and “performance-critical” parts

The mentioned performance issue is only applicable to a very limited part of our codebase, merely a few thousand lines of tight loops total.

It would be great if certain areas of code (e.g. a function, block, annotated region, or method) could be added to an ignore list, so that it does not get transformed in any way that affects performance considerably (e.g. variable names can still be mangled flat in place, but not much more).

While it is theoretically possible to obfuscate files separately, with the selfDefending option enabled, it becomes impractical (if not impossible) to pack files after obfuscation.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sanex3339commented, Jan 15, 2018

Yes (if i understood you correctly)

1reaction
JohnWeiszcommented, Jan 15, 2018

Ah, I’ll be damned, I’ve been looking through the docs a lot, but somehow missed that part. Thank you for your quick response.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Code Obfuscation As A Method Of Software Protection - Forbes
When properly implemented, code obfuscation is an effective solution for protecting your software against unauthorized analysis.
Read more >
What is obfuscation and how does it work? - TechTarget
Encrypting some or all of a program's code is one obfuscation method. Other approaches include stripping out potentially revealing metadata, replacing class and ......
Read more >
JavaScript Obfuscation: The Definitive Guide (2022)
This blog post aims to provide the most detailed and comprehensive guide to JavaScript obfuscation in 2022. Familiarity with JavaScript and ...
Read more >
Troubleshooting ProGuard issues on Android - Medium
The important part of correctly configuring ProGuard is letting it know which parts of your code are accessed at runtime and shouldn't be ......
Read more >
Java Obfuscator - Zelix KlassMaster™ - FAQ
It is recommended that you obfuscate only those references that are not accessed many times and which do not appear in performance critical...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found