Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Obfuscation performance#1206

doctor8296 started this conversation inGeneral
Sep 23, 2023· 1 comments· 2 replies
Discussion options

We know the fact that most of the time the code itself start to works a bit slower after obfuscation. This is okay sometimes, when the obfuscated code is not very important part of the app that do some important calculations and actually can affect user experience.
But what about obfuscation itself? For very small piece of code which is like 7 sane JavaScript lines and with the following settings (very light imho):

{compact:true,simplify:true,identifierNamesGenerator:'mangled-shuffled',renameGlobals:true,splitStrings:true,splitStringsChunkLength:3,stringArray:true,stringArrayEncoding:['rc4'],stringArrayShuffle:true,transformObjectKeys:true,unicodeEscapeSequence:true,seed:0}

it takes from 50 to 100 ms to obfuscate the source!
And this is a lot if we talking about site loading performance, and it was just a little piece from the many others (that I have).

So my question is

can we improve the obfuscation speed?

You must be logged in to vote

Replies: 1 comment 2 replies

Comment options

slig
Sep 23, 2023
Collaborator

You should obfuscate in your build process, so it doesn't affect the loading times.

You must be logged in to vote
2 replies
@doctor8296
Comment options

The thing is that I have very specific case where I need to reobfuscate code each request.

@slig
Comment options

sligSep 23, 2023
Collaborator

Got it. Then I'm not sure how to deal with it, as the obfuscator is blazing fast for its purpose. Maybe try running it on Bun, compiling it to wasm?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
General
Labels
None yet
2 participants
@doctor8296@slig

[8]ページ先頭

©2009-2025 Movatter.jp