SolarJS Posted December 31, 2014 Share Posted December 31, 2014 You should work for JScrambler to promote their tool JScrambler has too much disadvantages, named above several times, and locks are easy to write. But feel free to promote your locks with source so people can include them and save time. I am sure the community would appreciate it. Quote Link to comment Share on other sites More sharing options...
anupam Posted December 31, 2014 Share Posted December 31, 2014 Let me check if they are hiring :-) That was my point. I don't have any locks of my own. I use the ones provided by JScrambler. Quote Link to comment Share on other sites More sharing options...
SolarJS Posted December 31, 2014 Share Posted December 31, 2014 By the way, see how much JScrambler obfuscation hurts your performance (obscurity & performance hit can be even more!): http://jsperf.com/jscrambler/5 Safari hit: 66%! Not useable for high performance HTML 5 games, beside all the other arguments against it... SolarJS 1 Quote Link to comment Share on other sites More sharing options...
anupam Posted December 31, 2014 Share Posted December 31, 2014 After choosing the best set of transformations for my case, and using ignore code I got under 10% performance hit. Quote Link to comment Share on other sites More sharing options...
SolarJS Posted January 1, 2015 Share Posted January 1, 2015 Do you have a jsperf link for your testing scenario?I summed all points against it:http://www.html5gamedevs.com/topic/5807-best-way-to-hide-javascript-code/?p=65903 Quote Link to comment Share on other sites More sharing options...
anupam Posted January 5, 2015 Share Posted January 5, 2015 Hi @SolarJS I do not wish to publish a jsperf of my code, for the same reason I am using JScrambler. But I've looked into the jsperf you posted and applied Ignore Code Blocks to it.Here is the result: http://jsperf.com/jscrambler/6 I think the results are pretty self-explanatory. You can avoid the high performance hit if you know the code and you spend a few minutes instrumenting JScrambler not to hurt performance.But I think its up to everyone to judge and to see for themselves using their own code, as each code is a different story. You don't need to use big fonts in red to make yourself heard. There is certainly room for different opinions. Mine, yours, and others that may come. mentuat 1 Quote Link to comment Share on other sites More sharing options...
SolarJS Posted January 8, 2015 Share Posted January 8, 2015 Thanks for uploading. Changing the original code has lead to cutting the time out which the browsers compiler needs to decode the JScrambler code. This breaks of course the real-life testing... Quote Link to comment Share on other sites More sharing options...
anupam Posted January 8, 2015 Share Posted January 8, 2015 its doesn't make sense that you execute the loading code multiple times. The performance critical part is when you are doing animations. Everything is loaded prior to that. Quote Link to comment Share on other sites More sharing options...
SolarJS Posted January 8, 2015 Share Posted January 8, 2015 It does (although I didn't set up the test, just found it). As each user who waits for a game. Do you know the google statics that each additional 1s in loading / waiting hurts you revenue? And decoding produces GC and glitches, so you changed the test to, well, non-real-life application. And if i would really want to do a comparison, i would have used the original unchanged code and do not change it to match my expectations. Quote Link to comment Share on other sites More sharing options...
anupam Posted January 8, 2015 Share Posted January 8, 2015 Well, I think that is a matter of opinion. To sum it up (as I don't wish to make this an endless discussion) - JScrambler is the best protection for JS I know about. It offers way more obfuscation than other tools. - Like anything that uses obfuscation, it's not bullet proof and it may hurt performance. Unlike other tools, JScrambler allow you to tweak the way it transforms your code (using Ignore Code Blocks), and reduce the performance hit to acceptable levels (see http://jsperf.com/jscrambler/6) - It's quite ok to spend a few extra ms (well under a second) in the initial loading, and in exchange get the best protection I can to minimize the chance our code is hacked. - If performance is everything, and you can't waste any cpu cycles, then don't get protection. Instead, use a minifier/optimizer like closure or uglifyjs. The risk is higher. These are my 2 cents. Quote Link to comment Share on other sites More sharing options...
SolarJS Posted January 8, 2015 Share Posted January 8, 2015 Your PRO arguments:http://www.html5gamedevs.com/topic/5807-best-way-to-hide-javascript-code/?p=66951http://jsperf.com/jscrambler/6 And the arguments AGAINST:http://www.html5gamedevs.com/topic/5807-best-way-to-hide-javascript-code/?p=65903http://jsperf.com/jscrambler/5http://jsperf.com/jscrambler/7http://jsperf.com/jscrambler/10 Just "our" 2 cents. No let's get over to some other postings. I just saw you only posted about JScrambler... Quote Link to comment Share on other sites More sharing options...
anupam Posted January 8, 2015 Share Posted January 8, 2015 Yes, that's how I got to know this forum. Other people were sharing their experience and questions on protecting js and I was working on that too. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.