开发者

Slow shrinksafe operation during dojo build process

I use dojo build process on my application during build stage. But it is very slow, takes several minutes to optimize one big .js file. I am calling it within ant 开发者_高级运维build script and groovy antBuilder. Here is the call:

ant.java(classname:"org.mozilla.javascript.tools.shell.Main",fork:"true", failonerror:"true",dir:"${properties.'app.dir'}/WebRoot/release 1.5/util/buildscripts",maxmemory:"256m") {
        ant.jvmarg(value:"-Dfile.encoding=UTF8")                    
        ant.classpath() {
                                ant.pathelement(location:"${properties.'app.dir'}/WebRoot/release-1.5/util/shrinksafe/js.jar")
                                ant.pathelement(
location:"${properties.'app.dir'}/WebRoot/release-1.5/util/shrinksafe/shrinksafe.jar")
                            }
                            ant.arg(file:"${properties.'app.dir'}/WebRoot/release-1.5/util/buildscripts/build.js")
                        ant.arg(
line:"profileFile=${properties.'app.dir'}/dev-tools/build-scripts/standard.profile.js  releaseDir='../../../' releaseName=dojo15 version=0.1.0 action=clean,release")
                        }

and this is taking about 15 min to optimize and combine all dojo and our own files. Is there a way to speed it up, maybe run in parallel somehow. The script is running on a big 8 CPU solaris box so hardware is no problem here. Any suggestion?


We've had similar problems. Not sure exactly what it is about running in ant that makes it so much slower. You might try increasing the memory. We couldn't even get Shrinksafe to process large layers without increasing our heap beyond the 2g limit (needed a 64-bit JVM) You might also try using closure with the Dojo build tool.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜