Comments (11)
Hi, thanks for reporting!
The three processes are leiningen, the repl, and figwheel. You can bring it down to two by using lein trampoline repl
. This will replace the leiningen process with the repl once it starts.
Unfortunately Figwheel can't be used as a library, which means we have to invoke it through leiningen, so that creates an extra JVM. See also #47.
Apart from that this behavior is indeed "normal", although 2GB seems like a lot. For me it's more around 500MB.
There are various flags to control or limit the amount of memory the JVM uses, you could experiment with those.
from chestnut.
Would you be willing to share some details about your setup? I'm having a hard time understanding why someone people have such low memory numbers...
from chestnut.
This is what I use
$ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
$ lein --version
Leiningen 2.5.0 on Java 1.8.0_25 Java HotSpot(TM) 64-Bit Server VM
Not much special for the rest. ~/lein/profiles.clj
only contains the cider-nrepl
plugin. I'm not sure what else could be relevant here.
Is it only with chestnut projects that you have this? Maybe compare with some other configs to see what part is so memory hungry. So do a lein trampoline repl
in an empty directory, or in a new project, compare memory before/after (run)
, do lein figwheel
separately and see how that behaves, etc.
from chestnut.
Thank you for your help!
I have upgraded to JDK 1.8 and now my setup matches what you described (apart from the OS, of course).
A couple of notes:
- When using
lein trampoline repl
, I can't successfully execute the(browser-repl)
call. - When using the
cider-nrepl
middleware in my profile, I only get 2 java processes instead of 3 and save about 500mb of memory.
Yes, I have noticed this with other projects as well but this case was unfortunately especially bad.
Thanks again.
from chestnut.
Glad it's better now. It's good to know this is a pain point. I hope we can make it all work seemlessly in a single process eventually.
from chestnut.
I've been watching this and been thinking a lot about making a library thats executable from the repl.
from chestnut.
I think lively could be embedded in the process easily. You'd need to handle Clojurescript compilation on your own then though.
from chestnut.
@bhauman that would be absolutely fabulous!
@martinklepsch how does lively relate to figwheel? Are they completely separate implementations?
from chestnut.
@plexus They're separate. Lively only implements the pushing of new code to the the browser. And does not care about compiling Clojurescript.
from chestnut.
Just want to let you know that I just released lein-figwheel 0.2.0-SNAPSHOT and you can now launch the autobuilder/change server from the new figwheel-sidecar library.
Unfortunately config options are not yet validated at this level. The config validation is all still up in the leiningen plugin.
from chestnut.
Thank you @bhauman , that's great news!
from chestnut.
Related Issues (20)
- [Help] Tweaking the template to work with nodejs repl HOT 3
- Sass compiling doesn't work HOT 1
- om/om.next HOT 4
- Calling `(reset)` at the cljs-repl causes the system to be completely dropped HOT 2
- Trouble setting up HOT 2
- Figwheel version might need to be updated to latest HOT 7
- cider-cljs-lein-repl is obsolete (since 0.17); use ‘cider-default-cljs-repl’ instead HOT 1
- [Version 0.16.0 (67651e9d)] index.html references inexistent .js file, figwheel version inconsistency HOT 11
- Error when starting the application HOT 3
- Heroku procfile out of date HOT 1
- java.io.FileNotFoundException: Could not locate my_app/server__init.class or my_app/server.clj on classpath HOT 3
- Unrecognized option: +bidi HOT 2
- REPL server launch timed out HOT 4
- Figwheel CIDER middleware doesn't seem to be working. HOT 2
- Unable to resolve var: cider.piggieback/wrap-cljs-repl in this context HOT 5
- Repl never prompts HOT 11
- (go) has to be called every time a route is changed. HOT 1
- (go) not working (on repeat) HOT 1
- Cannot use resources folder in cljs. HOT 3
- (go) does not work in an Emacs CIDER REPL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chestnut.