Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java stack size to small by default to parse big files #25

Closed
ai-inmsu opened this issue Aug 24, 2014 · 1 comment
Closed

java stack size to small by default to parse big files #25

ai-inmsu opened this issue Aug 24, 2014 · 1 comment

Comments

@ai-inmsu
Copy link

When you try to bundle big files you can often get:

Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:21)
Caused by: java.lang.StackOverflowError
...

To prevent this you can call the YUI-compressor with java_opts:

          @content = YUI::JavaScriptCompressor.new(:java_opts => '-Xss8m').compress(@content)
        when 'css'
          @content = YUI::CssCompressor.new(:java_opts => '-Xss8m').compress(@content)
@moshen
Copy link
Owner

moshen commented Sep 15, 2014

Good to know. Thanks. I'll implement this.

@moshen moshen closed this as completed in ec2b2cd Jan 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants