On Feb 15, 9:59 am, Thatcher <[email protected]> wrote:
> On Feb 15, 9:27 am, Thatcher <[email protected]> wrote:
>
>
>
> > On Feb 6, 11:17 am, Thatcher <[email protected]> wrote:
>
> > > We had this problem before but because the entire project was nearly
> > > 63KB in a single closure I felt like it was related to the 64KB limit
> > > for single functions.  We recently did a big refactor so the dom,
> > > events, html, parser, timer, xhr, and window are each seperated and
> > > have clearer dependencies on each other.  Unfortunately, loading the
> > > parser at any point (which is about 32KB) still causes a silent
> > > failure that goes away with -opt -1.
>
> > > I realize I can set the optimization level internally to hide this
> > > requirement from the end user but I'm still a little perplexed why it
> > > wont compile...  The parser is an html 5 from the nu.parser project
> > > that is generated, mininfied javascript.
>
> > > Any ideas?
>
> > > Here is the general project link:http://github.com/thatcher/env-js/
>
> > > Here is the parser (actual 
> > > )http://github.com/thatcher/env-js/raw/master/dist/parser.js
>
> > > And here is the first test file that will fail without -opt 
> > > -1http://github.com/thatcher/env-js/raw/master/test/specs/parser/spec.js
>
> > > Is there some additional information I can provide to help you
> > > understand to issue in general?
>
> > > Thanks,
> > > Thatcher
>
> > I haven't heard anything back on this.  I was wondering if I could
> > clarify or could get pointed in a direction for tracking down the
> > issue myself.  The file is about 23KB in a single closure and fails
> > silently without -opt -1 but loads and runs fine with -opt -1.
>
> > What could be causing the silent failure that is otherwise avoided by
> > disabling optimization?  I've searched but haven't found much other
> > than posts related to the 64KB known limit for a single function.  
> > eghttp://ajax.sys-con.com/node/676073Butwe are now way under that
> > limit and still experiencing issues running in an optimized mode.
>
> > Thanks for any clues.
> > Thatcher
>
> This may help, if I try to compile the parser.js I get:
>
> christopher-thatchers-macbook-air:env-js thatcher$ java -cp rhino/
> js.jar org.mozilla.javascript.tools.jsc.Main -d dist dist/parser.js
> Exception in thread "main" org.mozilla.javascript.EvaluatorException:
> Encountered code generation error while compiling function "null":
> generated bytecode for method exceeds 64K limit. (dist/parser.js#45)
>         at org.mozilla.javascript.Context.reportRuntimeError(Context.java:
> 950)
>         at
> org.mozilla.javascript.optimizer.Codegen.reportClassFileFormatException(Codegen.java:
> 209)
>         at org.mozilla.javascript.optimizer.Codegen.generateCode(Codegen.java:
> 342)
>         at
> org.mozilla.javascript.optimizer.Codegen.compileToClassFile(Codegen.java:
> 195)
>         at
> org.mozilla.javascript.optimizer.ClassCompiler.compileToClassFiles(ClassCompiler.java:
> 187)
>         at org.mozilla.javascript.tools.jsc.Main.processSource(Main.java:276)
>         at org.mozilla.javascript.tools.jsc.Main.main(Main.java:73)
>
> but looking at the file:
>
> christopher-thatchers-macbook-air:env-js thatcher$ ls -lsa dist/
> parser.js
> 592 -rw-r--r--  1 thatcher  admin  302530 Feb 14 17:38 dist/parser.js
> christopher-thatchers-macbook-air:env-js thatcher$
>
> So how can it be possible that a 31KB file exceeds a 64KB function
> limit?  Am I missing something here?
>
> Thanks for any insight.
> Thatcher

Oh @#! I finally get it...  It's the size of the GENERATED bytecode
that is the issue.  So i guess I'm stuck with -opt -1 until sun
decides to up the non-native bytecode limit...  ouch.

So can anyone point to an actual performance comparision between
optimized and non-optimized modes...  I've been search but can't find
an actual comparision to understand the hit I'm taking.

Thatcher
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to