ClojureScript

cljsc hangs for ~ 1 minute after code is generated

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Mac OS X 10.8.2

Description

Running the Clojurescript compiler via command line hangs for ~1 minute after the compile is done. (By done I mean that complete code has been sent to stdout.)

I've observed this for a number of different options so I don't think it's related to options: optimization simple/advanced, pretty-print on/off, output-as used/not used.

I've tried using bin/cljsc and doing the command manually, a la:

$ cd bin
$ time java -cp "./../lib/*:./../src/clj:./../src/cljs:./../test/cljs" clojure.main "cljsc.clj" hello-world.cljs '{:optimizations :simple}'

I've only tested against one version of Clojurescript: today's master branch (0bfa1eac3599b55f3).

Activity

Hide
Brandon Harvey added a comment -

Tried a slightly older commit, e83204a9ad4002b1e from Oct 20. Saw issue there as well.

Show
Brandon Harvey added a comment - Tried a slightly older commit, e83204a9ad4002b1e from Oct 20. Saw issue there as well.
Hide
Brandon Harvey added a comment -

Calling (build) in a REPL does not show the issue.

$ ./script/repl
Clojure 1.4.0
user=> (require '[cljs.closure :as cljsc])
nil
user=> (time (cljsc/build "[path...]/hello-clojurescript.cljs" {:optimizations :simple :output-to "hello.js"}))
"Elapsed time: [3000-17000] msecs"

Show
Brandon Harvey added a comment - Calling (build) in a REPL does not show the issue. $ ./script/repl Clojure 1.4.0 user=> (require '[cljs.closure :as cljsc]) nil user=> (time (cljsc/build "[path...]/hello-clojurescript.cljs" {:optimizations :simple :output-to "hello.js"})) "Elapsed time: [3000-17000] msecs"
Hide
David Nolen added a comment -

Thanks for the details, will look into it.

Show
David Nolen added a comment - Thanks for the details, will look into it.
Hide
David Nolen added a comment -

It looks like the problem occurs when passing in any optimization level besides :none to cljsc.

Show
David Nolen added a comment - It looks like the problem occurs when passing in any optimization level besides :none to cljsc.
Hide
David Nolen added a comment - - edited

As far as I can tell this issue has affected ClojureScript for quite some time and has gone unnoticed because most users rely on lein-cljsbuild or they call into the compiler directly. And by quite some time I believe this may actually have something to do w/ the environment (JDK version, OS, etc). So lowering the priority on this.

Brandon, can you give more details on your Java environment?

Show
David Nolen added a comment - - edited As far as I can tell this issue has affected ClojureScript for quite some time and has gone unnoticed because most users rely on lein-cljsbuild or they call into the compiler directly. And by quite some time I believe this may actually have something to do w/ the environment (JDK version, OS, etc). So lowering the priority on this. Brandon, can you give more details on your Java environment?
Hide
Brandon Harvey added a comment -

$ java -version
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)

Does that help?

Show
Brandon Harvey added a comment - $ java -version java version "1.6.0_37" Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909) Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode) Does that help?
Hide
Herwig Hochleitner added a comment -

Please have a look at CLJS-415
A patch for this issue is provided there.

Show
Herwig Hochleitner added a comment - Please have a look at CLJS-415 A patch for this issue is provided there.
Hide
David Nolen added a comment -

duplicate CLJS-415

Show
David Nolen added a comment - duplicate CLJS-415

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: