This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-10
Channels
- # aleph (3)
- # announcements (1)
- # architecture (16)
- # bangalore-clj (1)
- # beginners (65)
- # biff (5)
- # calva (23)
- # clj-kondo (6)
- # clj-otel (12)
- # clojure-austin (2)
- # clojure-europe (11)
- # clojure-norway (7)
- # clojure-uk (1)
- # clojuredesign-podcast (2)
- # clojurescript (18)
- # conjure (3)
- # datomic (1)
- # deps-new (18)
- # events (1)
- # hyperfiddle (14)
- # java (4)
- # malli (5)
- # off-topic (10)
- # pathom (13)
- # polylith (10)
- # practicalli (1)
- # re-frame (3)
- # reitit (16)
- # releases (1)
- # rum (5)
- # shadow-cljs (17)
By the way what HW do you guys use for working on front-end apps? I used to be on 1GB free Oracle VM when on Ruby/Vim and it worked (over Mosh, I just worked on my iPad Pro and it worked like a charm, it was plain Ruby though, with Rails 2 GB were highly desirable and swap was enabled). Now only Java that I start with ShadowCLJS takes over 800MB. I also found myself challenged for horizontal space: given I'm on 13" MB Air with a large font, 120 characters is basically my whole screen. So what do you guys use in terms of: • RAM??? • Monitor(s?)? 13" is really insufficient when it comes to Chrome Web Dev Tools as well :/ • Any other HW info that could be interesting. Additionally any info about how much demanding it gets when the app gets bigger is welcome, I have very little at this point and it's already very resource demanding and I have M2 MB Air which is a very fast chip (but with 8GB MEM, that's definitely an issue there).
You can constrain the memory shadow-cljs uses, the default settings often use more than actually needed. It likely runs fine with 512mb. With shadow-cljs.edn
you can set :jvm-opts ["-Xmx512M"]
, or the equiv in deps.edn
or project.clj
if you use those
I myself just upgraded my pc, so it is pretty fast. Intel i9-13900K, 32gb ram, fast m2 ssd, etc. 2 2560x1440 monitors. still doesn't feel fast enough, but way faster than the 5 year old machine I had before. m2 chip is definitely fast enough, but you are correct memory is the issue.
Man you can launch rockets into space with such a badass machine. You have 8 GBs to spare I have 8 GB, full stop 😄
@U05224H0W Anyway I wanted to ask, how does ShadowCLJS behaves with these jvm-opts
if you give it way too little memory? Would it constrain it at any cost (even crashing) or would it just take the bare minimum?
; deps.edn
+ :aliases {:cljs {:jvm-opts ["-Xmx256M"]}}
; shadow-cljs.edn
+ {:deps {:aliases [:cljs]}
It's still taking 480 MB of RAM. It feels like a lot (I'm not used to JVM quite yet!), but then again I suppose that's as good as it gets?
I never did any tests regarding memory use. I don't know how much the minimum is. you'll start seeing error messages if its too low I presume, never tested
OK I'll keep an eye on it. Now it's 500MB+ and it's a really basic reagent app.
Of course I restarted.
It's taking 300MB less memory now at least so far.
I'm running it by npx shadow-cljs watch app
, not sure whether it's relevant.