Forgetting about compiling for security/obscurity for just a second
and getting back to the optimisation ...

I have been thinking about this for not just extensions but for other
large JS libraries and only for startup speed and download size.
Because this could be used for more than just extensions, please think
about my comments in broader terms as well.

Standard optimisation practise teaches us that humans can't detect the
difference in speed if there is less than a 20% improvement, thus if
you can't get 20% then don't even bother.
So the simple question is can pre-compiling produce at least a 20%
improvement in download time and/or startup time ?  I would like to
think there is potential there and that it could come close for larger
and more complex scripts, but that is just a guess.

There is a cost of losing platform independence, but in some cases
that may be acceptable.  There is also a cost involved with managing
changes in the JS engine and how the precompiled code would
function.
Both of these can be offset by compiling on the first run and after
each JS engine change.

Has anyone looked into it more or done any tests ?



On Aug 26, 12:40 am, Jon Rimmer <[email protected]> wrote:
> It should also be noted that the ECMAScript standard requires that a
> call to a function object's toString method returns the source code to
> the method, so any JavaScript implementation that accepted compiled JS
> and could not produce decompiled code upon request would be non-
> standard.
>
> On Aug 25, 11:21 am, Jon Rimmer <[email protected]> wrote:
>
>
>
> > Harder for who? The average computer user isn't likely to start
> > cracking open your extension to view the source either. For someone
> > who knows what they're doing, reverse engineering some hypothetical JS
> > bytecode isn't likely to be any more difficult than understanding
> > obfuscated JS source. And a compiled binary is no harder to copy and
> > re-publish than an uncompiled source file.
>
> > Secondly, as Aaron was saying, the whole foundation of the web is
> > about openness. The ability to easily 'view source' on HTML,
> > JavaScript and CSS helped drive its popularity and made it an easy
> > platform to learn. With Chrome, the web sites are open, the browser is
> > open, so why should the extensions be closed? If you really that
> > desparate for people not to see your source, then either develop using
> > NPAPI, or develop an extension for a more philosophically compatible
> > browser like IE.
>
> > On Aug 24, 1:06 pm, PhistucK <[email protected]> wrote:
>
> > > Wow, wow, wow.Chill.
>
> > > Not every single computer user can reverse engineer a binary.
> > > It *is* harder than simply checking out a source code.
> > > Some people do not go that far.
> > > Some people just want their extension not to be copied and re-published 
> > > that
> > > easily. Or can you not understand that?
>
> > > ☆PhistucK
>
> > > On Mon, Aug 24, 2009 at 14:33, Uriel <[email protected]> wrote:
>
> > > > On Mon, Aug 24, 2009 at 12:42 AM, Aaron Boodman<[email protected]> 
> > > > wrote:
>
> > > > > On Sun, Aug 23, 2009 at 2:13 PM,
> > > > > If you really do want this, you have the option to include NPAPI
> > > > > plugins in your extension written in native code. Those are a lot
> > > > > harder to reverse engineer.
>
> > > > They still can be reverse engineered easily enough, and anyone that
> > > > relies on this for security, or for anything else, deserves to be
> > > > fired on the spot for being totally incompetent.
>
> > > > uriel
>
> > > > > But the JavaScript, HTML, and CSS in Chromium extensions will never be
> > > > > obfuscated. Any compilation will just be an optimization, and
> > > > > transparent to the developer.
>
> > > > > - a

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to