3 ms·
Can you please give a use case of a program that a few hundred ms delay during startup would be an issue?
by democracy 13y ago
Can you please give a use case of a program that a few hundred ms delay during startup would be an issue?
- gkya 13y agoFew hundred milliseconds? I played with clojure a month or so ago and invoking lein repl was ~7.5 seconds.
- tieTYT 13y agoYes, I can confirm this. Clojure seems like a good fit for tiny projects that are little more than scripts, but the start up time makes them kind of annoying to manually test. Fortunately Clojure does have a REPL.
- gkya 13y agoThe best cure to this problem is nREPL. It basically is an REPL server. There are plugins for Emacs (nrepl) and vim (vim-fireplace). With these tools, one may start a user repl and run tests within that. I have written a humble guide to set up Emacs for clojure here: http://gkayaalp.com/2014/01/28/taste-clojure.html#emacs http://gkayaalp.com/2014/01/28/taste-clojure.html#emacs My emacs configuration repository is gone thought; I'm using vim these days. A JVM with smaller memory and cpu needs and faster startup would make me consider using Scala/Clojure again.
- craigching 13y ago> There are plugins for Emacs (nrepl) I think nrepl for emacs has been replaced by cider (which still uses nREPL)
- gkya 13y agoAFAIK Cider is like SLIME, big and integrated. Emacs nrepl is just the repl connection, and is usually enough (at least, has been enough for me).
- craigching 13y agoOk, maybe I'm misunderstanding, but from [1]: "CIDER (formerly nrepl.el) is the Clojure IDE and REPL for Emacs, built on top of nREPL, the Clojure networked REPL server." That and the availability of the packages on melpa: cider 20140318.... available Clojure Integrated Development Environment and REPL And the fact that technomancy's git repository for nrepl.el hasn't been touched in 2 years leads me to believe that cider is the better nREPL choice ;) Be happy to hear that nrepl.el is still maintained and is better in some way than cider, but I don't see cider as being that heavy (at least as compared to SLIME). [1] -- https://github.com/clojure-emacs/cider https://github.com/clojure-emacs/cider
- democracy 13y agoI never worked with Clojure, but a simple java "hello world" starts and finishes within a second. Same with a simple java Swing UI "hello world" sample. If some application is doing something slow during initialization - it is not the platform itself, but the specific code to blame.
- gkya 13y agoLein starts a JVM instance for itself, then loads plugins, checks dependencies etc. and starts a new JVM instance for the program if necessary.
- pron 13y agoYes, but that's more of a Clojure problem than a JVM problem.
- duaneb 13y agols
- syncsynchalt 13y agoPractically any command line utility? eg. ls, cat, sort, uniq, ps, what have you. I'm constantly amazed that make(1) can do successive recompiles of a 50k LOC project in less than a second, while gradle / maven / etc takes upwards of a minute.
- democracy 13y agoGood example, but we have heaps of command-line utilities written in Java. Many complaints but never about performance or start-up time. For some low-level programs executed hundreds of time per session (like "ls") I agree it adds up and might cause frustration. Java is a bad choice for this niche, but you are not going to write them in Python anyway, aren't you? PS: Just tested "LS" in Java, less than a second run, I could personally live with that.